mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
Add explicit dyn trait casts
So Rust Analyzer stops complaining.
This commit is contained in:
@@ -308,7 +308,8 @@ impl Plugin for Crisp {
|
|||||||
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
||||||
|
|
||||||
fn params(&self) -> Arc<dyn Params> {
|
fn params(&self) -> Arc<dyn Params> {
|
||||||
self.params.clone()
|
// The explicit cast is not needed, but Rust Analyzer gets very upset when you don't do it
|
||||||
|
self.params.clone() as Arc<dyn Params>
|
||||||
}
|
}
|
||||||
|
|
||||||
fn editor(&self) -> Option<Box<dyn Editor>> {
|
fn editor(&self) -> Option<Box<dyn Editor>> {
|
||||||
|
|||||||
@@ -240,7 +240,8 @@ impl Plugin for Diopser {
|
|||||||
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
||||||
|
|
||||||
fn params(&self) -> Arc<dyn Params> {
|
fn params(&self) -> Arc<dyn Params> {
|
||||||
self.params.clone()
|
// The explicit cast is not needed, but Rust Analyzer gets very upset when you don't do it
|
||||||
|
self.params.clone() as Arc<dyn Params>
|
||||||
}
|
}
|
||||||
|
|
||||||
fn editor(&self) -> Option<Box<dyn Editor>> {
|
fn editor(&self) -> Option<Box<dyn Editor>> {
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ impl Plugin for Gain {
|
|||||||
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
||||||
|
|
||||||
fn params(&self) -> Arc<dyn Params> {
|
fn params(&self) -> Arc<dyn Params> {
|
||||||
self.params.clone()
|
// The explicit cast is not needed, but Rust Analyzer gets very upset when you don't do it
|
||||||
|
self.params.clone() as Arc<dyn Params>
|
||||||
}
|
}
|
||||||
|
|
||||||
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ impl Plugin for MidiInverter {
|
|||||||
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
||||||
|
|
||||||
fn params(&self) -> Arc<dyn Params> {
|
fn params(&self) -> Arc<dyn Params> {
|
||||||
// The explicit cast is not needed, Rust Analyzer just doesn't get it otherwise
|
// The explicit cast is not needed, but Rust Analyzer gets very upset when you don't do it
|
||||||
self.params.clone() as Arc<dyn Params>
|
self.params.clone() as Arc<dyn Params>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ impl Plugin for Sine {
|
|||||||
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
||||||
|
|
||||||
fn params(&self) -> Arc<dyn Params> {
|
fn params(&self) -> Arc<dyn Params> {
|
||||||
self.params.clone()
|
// The explicit cast is not needed, but Rust Analyzer gets very upset when you don't do it
|
||||||
|
self.params.clone() as Arc<dyn Params>
|
||||||
}
|
}
|
||||||
|
|
||||||
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ impl Plugin for Stft {
|
|||||||
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
const SAMPLE_ACCURATE_AUTOMATION: bool = true;
|
||||||
|
|
||||||
fn params(&self) -> Arc<dyn Params> {
|
fn params(&self) -> Arc<dyn Params> {
|
||||||
self.params.clone()
|
// The explicit cast is not needed, but Rust Analyzer gets very upset when you don't do it
|
||||||
|
self.params.clone() as Arc<dyn Params>
|
||||||
}
|
}
|
||||||
|
|
||||||
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
||||||
|
|||||||
@@ -150,7 +150,8 @@ impl Plugin for PubertySimulator {
|
|||||||
const DEFAULT_NUM_OUTPUTS: u32 = 2;
|
const DEFAULT_NUM_OUTPUTS: u32 = 2;
|
||||||
|
|
||||||
fn params(&self) -> Arc<dyn Params> {
|
fn params(&self) -> Arc<dyn Params> {
|
||||||
self.params.clone()
|
// The explicit cast is not needed, but Rust Analyzer gets very upset when you don't do it
|
||||||
|
self.params.clone() as Arc<dyn Params>
|
||||||
}
|
}
|
||||||
|
|
||||||
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
fn accepts_bus_config(&self, config: &BusConfig) -> bool {
|
||||||
|
|||||||
Reference in New Issue
Block a user