Skip to content

Commit

Permalink
fix typo - AdvancedRemove -> AdvancedRemote
Browse files Browse the repository at this point in the history
  • Loading branch information
konnek1ive committed Nov 21, 2023
1 parent f729243 commit 8a0e5a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions structural/bridge/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mod device;
mod remotes;

use device::{Device, Radio, Tv};
use remotes::{AdvancedRemove, BasicRemote, HasMutableDevice, Remote};
use remotes::{AdvancedRemote, BasicRemote, HasMutableDevice, Remote};

fn main() {
test_device(Tv::default());
Expand All @@ -16,7 +16,7 @@ fn test_device(device: impl Device + Clone) {
basic_remote.device().print_status();

println!("Tests with advanced remote.");
let mut advanced_remote = AdvancedRemove::new(device);
let mut advanced_remote = AdvancedRemote::new(device);
advanced_remote.power();
advanced_remote.mute();
advanced_remote.device().print_status();
Expand Down
8 changes: 4 additions & 4 deletions structural/bridge/remotes/advanced.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use crate::device::Device;

use super::{HasMutableDevice, Remote};

pub struct AdvancedRemove<D: Device> {
pub struct AdvancedRemote<D: Device> {
device: D,
}

impl<D: Device> AdvancedRemove<D> {
impl<D: Device> AdvancedRemote<D> {
pub fn new(device: D) -> Self {
Self { device }
}
Expand All @@ -17,10 +17,10 @@ impl<D: Device> AdvancedRemove<D> {
}
}

impl<D: Device> HasMutableDevice<D> for AdvancedRemove<D> {
impl<D: Device> HasMutableDevice<D> for AdvancedRemote<D> {
fn device(&mut self) -> &mut D {
&mut self.device
}
}

impl<D: Device> Remote<D> for AdvancedRemove<D> {}
impl<D: Device> Remote<D> for AdvancedRemote<D> {}
2 changes: 1 addition & 1 deletion structural/bridge/remotes/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod advanced;
mod basic;

pub use advanced::AdvancedRemove;
pub use advanced::AdvancedRemote;
pub use basic::BasicRemote;

use crate::device::Device;
Expand Down

0 comments on commit 8a0e5a8

Please sign in to comment.