diff --git a/src/dir/gen2.rs b/src/dir/gen2.rs index 7e1d5cf..5522a21 100644 --- a/src/dir/gen2.rs +++ b/src/dir/gen2.rs @@ -339,7 +339,7 @@ impl Directory { } /// Get the offset ranges of the chunks. - fn chunks_as_ranges(self: &Self, chunks: &Vec, stream_end: usize) -> Vec> { + fn chunks_as_ranges(&self, chunks: &Vec, stream_end: usize) -> Vec> { // NOTE: This is the end of the directory. // me_cleaner uses the end of the ME region. let dir_end = self.offset + self.size; @@ -430,7 +430,7 @@ impl Directory { impl Removables for Directory { /// Removable ranges relative to the start of the Directory - fn removables(self: &Self, retention_list: &Vec) -> Vec> { + fn removables(&self, retention_list: &Vec) -> Vec> { use log::{debug, info, warn}; let debug = false; let mut removables = vec![]; diff --git a/src/dir/gen3.rs b/src/dir/gen3.rs index 3e35f28..1d84e32 100644 --- a/src/dir/gen3.rs +++ b/src/dir/gen3.rs @@ -212,7 +212,7 @@ impl CodePartitionDirectory { impl Removables for CodePartitionDirectory { /// Removable ranges relative to the start of the directory - fn removables(self: &Self, retention_list: &Vec) -> Vec> { + fn removables(&self, retention_list: &Vec) -> Vec> { use log::info; let mut removables = vec![]; diff --git a/src/lib.rs b/src/lib.rs index 48c1704..eafe585 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ pub const EMPTY: u8 = 0xff; pub trait Removables { /// Get removable ranges relative to the start of a section or directory. /// The respective section/directory needs to know its own offset. - fn removables(self: &Self, retention_list: &Vec) -> Vec>; + fn removables(&self, retention_list: &Vec) -> Vec>; } #[derive(Serialize, Deserialize, Clone, Debug)] diff --git a/src/part/partitions.rs b/src/part/partitions.rs index 575a5ac..e5ac85c 100644 --- a/src/part/partitions.rs +++ b/src/part/partitions.rs @@ -37,7 +37,7 @@ impl<'a> IntoIterator for &'a Partitions { } impl Partitions { - pub fn get_entries(self: &Self) -> Vec { + pub fn get_entries(&self) -> Vec { self.into_iter().map(|p| *p.entry()).collect() }