diff options
author | Colin Finck <colin@reactos.org> | 2021-04-23 21:25:30 +0300 |
---|---|---|
committer | Colin Finck <colin@reactos.org> | 2021-04-23 21:25:30 +0300 |
commit | 30f8b3295dad5799e5e4ca191a4045c900b29be0 (patch) | |
tree | 1acde0687e1beb3999e909d33cea95ed3e2dad75 | |
parent | 58a842d975f78eff3cd3ae894235d8da4cd2eb56 (diff) |
Rename `read_structured_value` -> `structured_value`
All functions prefixed with "read" take a buffer to read into, and this is not the case here.
-rw-r--r-- | src/attribute.rs | 2 | ||||
-rw-r--r-- | src/ntfs.rs | 4 | ||||
-rw-r--r-- | src/structured_values/file_name.rs | 2 | ||||
-rw-r--r-- | src/structured_values/standard_information.rs | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/src/attribute.rs b/src/attribute.rs index 37d5582..ec6a8e4 100644 --- a/src/attribute.rs +++ b/src/attribute.rs @@ -229,7 +229,7 @@ impl NtfsAttribute { Ok(NtfsString(&buf[..name_length])) } - pub fn read_structured_value<T>(&self, fs: &mut T) -> Result<NtfsStructuredValue> + pub fn structured_value<T>(&self, fs: &mut T) -> Result<NtfsStructuredValue> where T: Read + Seek, { diff --git a/src/ntfs.rs b/src/ntfs.rs index 355fcee..aa1beb8 100644 --- a/src/ntfs.rs +++ b/src/ntfs.rs @@ -141,7 +141,7 @@ impl Ntfs { ty: NtfsAttributeType::VolumeName, })??; - let value = attribute.read_structured_value(fs)?; + let value = attribute.structured_value(fs)?; let volume_info = match value { NtfsStructuredValue::VolumeInformation(volume_info) => volume_info, _ => unreachable!( @@ -177,7 +177,7 @@ impl Ntfs { ty == NtfsAttributeType::VolumeName })?); - let value = iter_try!(attribute.read_structured_value(fs)); + let value = iter_try!(attribute.structured_value(fs)); let volume_name = match value { NtfsStructuredValue::VolumeName(volume_name) => volume_name, _ => unreachable!( diff --git a/src/structured_values/file_name.rs b/src/structured_values/file_name.rs index 840fa82..7a2edf6 100644 --- a/src/structured_values/file_name.rs +++ b/src/structured_values/file_name.rs @@ -167,7 +167,7 @@ mod tests { assert_eq!(attribute.value_length(), 74); // Check the actual "file name" of the MFT. - let value = attribute.read_structured_value(&mut testfs1).unwrap(); + let value = attribute.structured_value(&mut testfs1).unwrap(); let file_name = match value { NtfsStructuredValue::FileName(file_name) => file_name, v => panic!("Unexpected NtfsStructuredValue: {:?}", v), diff --git a/src/structured_values/standard_information.rs b/src/structured_values/standard_information.rs index e7bfb51..1be0b3b 100644 --- a/src/structured_values/standard_information.rs +++ b/src/structured_values/standard_information.rs @@ -146,7 +146,7 @@ mod tests { assert_eq!(attribute.value_length(), 72); // Try to read the actual information. - let value = attribute.read_structured_value(&mut testfs1).unwrap(); + let value = attribute.structured_value(&mut testfs1).unwrap(); let _standard_info = match value { NtfsStructuredValue::StandardInformation(standard_info) => standard_info, v => panic!("Unexpected NtfsStructuredValue: {:?}", v), |