Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/dir/gen2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl Directory {
}

/// Get the offset ranges of the chunks.
fn chunks_as_ranges(self: &Self, chunks: &Vec<u32>, stream_end: usize) -> Vec<Range<usize>> {
fn chunks_as_ranges(&self, chunks: &Vec<u32>, stream_end: usize) -> Vec<Range<usize>> {
// NOTE: This is the end of the directory.
// me_cleaner uses the end of the ME region.
let dir_end = self.offset + self.size;
Expand Down Expand Up @@ -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<String>) -> Vec<Range<usize>> {
fn removables(&self, retention_list: &Vec<String>) -> Vec<Range<usize>> {
use log::{debug, info, warn};
let debug = false;
let mut removables = vec![];
Expand Down
2 changes: 1 addition & 1 deletion src/dir/gen3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) -> Vec<Range<usize>> {
fn removables(&self, retention_list: &Vec<String>) -> Vec<Range<usize>> {
use log::info;
let mut removables = vec![];

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>) -> Vec<core::ops::Range<usize>>;
fn removables(&self, retention_list: &Vec<String>) -> Vec<core::ops::Range<usize>>;
}

#[derive(Serialize, Deserialize, Clone, Debug)]
Expand Down
2 changes: 1 addition & 1 deletion src/part/partitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl<'a> IntoIterator for &'a Partitions {
}

impl Partitions {
pub fn get_entries(self: &Self) -> Vec<FPTEntry> {
pub fn get_entries(&self) -> Vec<FPTEntry> {
self.into_iter().map(|p| *p.entry()).collect()
}

Expand Down