Skip to content

Commit

Permalink
#160 Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Mar 9, 2021
1 parent a1df868 commit d97248c
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 67 deletions.
5 changes: 5 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ generate = []
prometheus = ["serde_prometheus"]

[dependencies]
# reaper-rx = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master" }
# reaper-high = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master", features = ["serde"] }
# reaper-medium = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master", features = ["serde"] }
# reaper-low = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master" }
reaper-rx = { path = "../../reaper-rs/main/rx" }
reaper-high = { path = "../../reaper-rs/main/high", features = ["serde"] }
reaper-medium= { path = "../../reaper-rs/main/medium", features = ["serde"] }
reaper-low = { path = "../../reaper-rs/main/low" }
reaper-rx = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master" }
reaper-high = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master", features = ["serde"] }
reaper-medium = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master", features = ["serde"] }
reaper-low = { git = "https://github.com/helgoboss/reaper-rs.git", branch = "master" }
#reaper-rx = { path = "../../reaper-rs/main/rx" }
#reaper-high = { path = "../../reaper-rs/main/high", features = ["serde"] }
#reaper-medium= { path = "../../reaper-rs/main/medium", features = ["serde"] }
#reaper-low = { path = "../../reaper-rs/main/low" }
swell-ui = { path = "../swell-ui" }
rx-util = { path = "../rx-util" }
helgoboss-midi = { version = "0.2", features = ["serde", "serde_repr"] }
Expand Down
2 changes: 1 addition & 1 deletion main/lib/helgoboss-learn
Submodule helgoboss-learn updated 1 files
+2 −2 Cargo.toml
4 changes: 2 additions & 2 deletions main/src/application/mapping_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use crate::application::{
use crate::core::{prop, Prop};
use crate::domain::{
ActivationCondition, CompoundMappingTarget, ExtendedProcessorContext, ExtendedSourceCharacter,
MainMapping, MappingCompartment, MappingId, ProcessorContext, ProcessorMappingOptions,
RealearnTarget, ReaperTarget, TargetCharacter,
MainMapping, MappingCompartment, MappingId, ProcessorMappingOptions, RealearnTarget,
ReaperTarget, TargetCharacter,
};

use std::cell::RefCell;
Expand Down
2 changes: 1 addition & 1 deletion main/src/application/preset.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::application::{GroupModel, MappingModel, SharedGroup, SharedMapping, TargetCategory};
use crate::domain::{ExtendedProcessorContext, ProcessorContext, VirtualFx, VirtualTrack};
use crate::domain::{ExtendedProcessorContext, VirtualFx, VirtualTrack};
use std::fmt;
use std::fmt::Debug;

Expand Down
1 change: 0 additions & 1 deletion main/src/application/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::domain::{
NormalRealTimeTask, OscDeviceId, ParameterArray, ProcessorContext, RealSource, ReaperTarget,
TargetValueChangedEvent, VirtualSource, PLUGIN_PARAMETER_COUNT, ZEROED_PLUGIN_PARAMETERS,
};
use enum_iterator::IntoEnumIterator;
use enum_map::EnumMap;

use reaper_high::Reaper;
Expand Down
1 change: 0 additions & 1 deletion main/src/application/target_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use crate::domain::{
use serde_repr::*;
use std::borrow::Cow;

use fasteval::Compiler;
use reaper_medium::BookmarkId;
use std::fmt;
use std::fmt::{Display, Formatter};
Expand Down
1 change: 0 additions & 1 deletion main/src/domain/main_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use crate::domain::{
RealearnMonitoringFxParameterValueChangedEvent, ReaperTarget, SourceValue,
TargetValueChangedEvent, VirtualSourceValue,
};
use enum_iterator::IntoEnumIterator;
use enum_map::EnumMap;
use helgoboss_learn::{ControlValue, MidiSource, OscSource, UnitValue};

Expand Down
4 changes: 2 additions & 2 deletions main/src/domain/mapping.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::domain::{
ActivationChange, ActivationCondition, ControlOptions, ExtendedProcessorContext,
MappingActivationEffect, Mode, ParameterArray, ProcessorContext, RealearnTarget, ReaperTarget,
TargetCharacter, UnresolvedReaperTarget, VirtualSource, VirtualSourceValue, VirtualTarget,
MappingActivationEffect, Mode, ParameterArray, RealearnTarget, ReaperTarget, TargetCharacter,
UnresolvedReaperTarget, VirtualSource, VirtualSourceValue, VirtualTarget,
};
use derive_more::Display;
use enum_iterator::IntoEnumIterator;
Expand Down
1 change: 0 additions & 1 deletion main/src/domain/real_time_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use slog::debug;
use std::collections::HashMap;

use crate::core::Global;
use enum_iterator::IntoEnumIterator;
use enum_map::{enum_map, EnumMap};
use std::ptr::null_mut;
use std::time::Duration;
Expand Down
7 changes: 3 additions & 4 deletions main/src/domain/unresolved_reaper_target.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::application::BookmarkAnchorType;
use crate::core::hash_util;
use crate::domain::{
ActionInvocationType, DomainGlobal, ExtendedProcessorContext, ParameterArray, ProcessorContext,
ReaperTarget, SoloBehavior, TouchedParameterType, TrackExclusivity, TransportAction,
PLUGIN_PARAMETER_COUNT,
ActionInvocationType, DomainGlobal, ExtendedProcessorContext, ParameterArray, ReaperTarget,
SoloBehavior, TouchedParameterType, TrackExclusivity, TransportAction, PLUGIN_PARAMETER_COUNT,
};
use derive_more::{Display, Error};
use fasteval::{Compiler, Evaler, Instruction, Slab};
Expand Down Expand Up @@ -408,7 +407,7 @@ impl ExpressionEvaluator {

fn evaluate_internal(&self, params: &ParameterArray) -> Result<f64, fasteval::Error> {
use fasteval::eval_compiled_ref;
let mut cb = |name: &str, args: Vec<f64>| -> Option<f64> {
let mut cb = |name: &str, _args: Vec<f64>| -> Option<f64> {
if !name.starts_with('p') {
return None;
}
Expand Down
2 changes: 1 addition & 1 deletion main/src/infrastructure/data/mapping_model_data.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::application::{GroupId, MappingModel};
use crate::core::default_util::is_default;
use crate::domain::{ExtendedProcessorContext, MappingCompartment, MappingId, ProcessorContext};
use crate::domain::{ExtendedProcessorContext, MappingCompartment, MappingId};
use crate::infrastructure::data::{
ActivationConditionData, EnabledData, MigrationDescriptor, ModeModelData, SourceModelData,
TargetModelData,
Expand Down
4 changes: 2 additions & 2 deletions main/src/infrastructure/data/target_model_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ use crate::application::{
use crate::core::default_util::{is_default, is_none_or_some_default};
use crate::core::notification;
use crate::domain::{
ActionInvocationType, ExtendedProcessorContext, FxAnchor, ProcessorContext, SoloBehavior,
TouchedParameterType, TrackExclusivity, TransportAction, VirtualFx, VirtualTrack,
ActionInvocationType, ExtendedProcessorContext, FxAnchor, SoloBehavior, TouchedParameterType,
TrackExclusivity, TransportAction, VirtualFx, VirtualTrack,
};
use derive_more::{Display, Error};
use semver::Version;
Expand Down
23 changes: 12 additions & 11 deletions main/src/infrastructure/ui/header_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ use crate::application::{
SharedSession, VirtualControlElementType, WeakSession,
};
use crate::core::when;
use crate::domain::{
ExtendedProcessorContext, MappingCompartment, OscDeviceId, ProcessorContext, ReaperTarget,
};
use crate::domain::{ExtendedProcessorContext, MappingCompartment, OscDeviceId, ReaperTarget};
use crate::domain::{MidiControlInput, MidiFeedbackOutput};
use crate::infrastructure::data::{ExtendedPresetManager, OscDevice, SessionData};
use crate::infrastructure::plugin::{
Expand Down Expand Up @@ -318,7 +316,8 @@ impl HeaderPanel {
fn invalidate_compartment_combo_box(&self) {
self.view
.require_control(root::ID_COMPARTMENT_COMBO_BOX)
.select_combo_box_item_by_index(self.active_compartment().into());
.select_combo_box_item_by_index(self.active_compartment().into())
.unwrap();
}

fn invalidate_preset_auto_load_mode_combo_box(&self) {
Expand All @@ -327,13 +326,15 @@ impl HeaderPanel {
if self.active_compartment() == MappingCompartment::MainMappings {
label.show();
combo.show();
combo.select_combo_box_item_by_index(
self.session()
.borrow()
.main_preset_auto_load_mode
.get()
.into(),
);
combo
.select_combo_box_item_by_index(
self.session()
.borrow()
.main_preset_auto_load_mode
.get()
.into(),
)
.unwrap();
} else {
label.hide();
combo.hide();
Expand Down
9 changes: 6 additions & 3 deletions main/src/infrastructure/ui/mapping_header_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ impl MappingHeaderPanel {
fn invalidate_activation_type_combo_box(&self, item: &dyn Item) {
self.view
.require_control(root::ID_MAPPING_ACTIVATION_TYPE_COMBO_BOX)
.select_combo_box_item_by_index(item.activation_type().into());
.select_combo_box_item_by_index(item.activation_type().into())
.unwrap();
}

fn invalidate_activation_setting_1_controls(&self, item: &dyn Item) {
Expand All @@ -260,7 +261,8 @@ impl MappingHeaderPanel {
let param_index = item.program_condition().param_index();
self.view
.require_control(root::ID_MAPPING_ACTIVATION_SETTING_1_COMBO_BOX)
.select_combo_box_item_by_index(param_index as _);
.select_combo_box_item_by_index(param_index as _)
.unwrap();
}
_ => {}
};
Expand All @@ -280,7 +282,8 @@ impl MappingHeaderPanel {
let program_index = item.program_condition().program_index();
self.view
.require_control(root::ID_MAPPING_ACTIVATION_SETTING_2_COMBO_BOX)
.select_combo_box_item_by_index(program_index as _);
.select_combo_box_item_by_index(program_index as _)
.unwrap();
}
_ => {}
};
Expand Down
Loading

0 comments on commit d97248c

Please sign in to comment.