diff options
Diffstat (limited to 'src/formats')
-rw-r--r-- | src/formats/debug.rs | 2 | ||||
-rw-r--r-- | src/formats/inhx.rs | 2 | ||||
-rw-r--r-- | src/formats/inhx32.rs | 2 | ||||
-rw-r--r-- | src/formats/mod.rs | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/formats/debug.rs b/src/formats/debug.rs index 23fd34f..c264077 100644 --- a/src/formats/debug.rs +++ b/src/formats/debug.rs @@ -14,5 +14,5 @@ pub fn format_debug(segments: &[Segment]) -> Result<Vec<u8>, FormatError> { output.push_str(&format!(" {string:>w$}\n")); } } - return Ok(output.as_bytes().to_vec()); + return Ok(output.into_bytes()); } diff --git a/src/formats/inhx.rs b/src/formats/inhx.rs index fc4791b..7aa0c5e 100644 --- a/src/formats/inhx.rs +++ b/src/formats/inhx.rs @@ -17,7 +17,7 @@ pub fn format_inhx(segments: &[Segment]) -> Result<Vec<u8>, FormatError> { for record in records { output.push_str(&record.to_string()); } - return Ok(output.as_bytes().to_vec()); + return Ok(output.into_bytes()); } fn data_record(words: &[Tracked<Word>], address: usize) -> Result<InhxRecord, FormatError> { diff --git a/src/formats/inhx32.rs b/src/formats/inhx32.rs index 8febeae..88780eb 100644 --- a/src/formats/inhx32.rs +++ b/src/formats/inhx32.rs @@ -21,7 +21,7 @@ pub fn format_inhx32(segments: &[Segment]) -> Result<Vec<u8>, FormatError> { for record in records { output.push_str(&record.to_string()); } - return Ok(output.as_bytes().to_vec()); + return Ok(output.into_bytes()); } fn data_record(words: &[Tracked<Word>], address: usize) -> Result<InhxRecord, FormatError> { diff --git a/src/formats/mod.rs b/src/formats/mod.rs index 132001a..a77bd72 100644 --- a/src/formats/mod.rs +++ b/src/formats/mod.rs @@ -30,7 +30,7 @@ impl Format { "inhx32" => Self::Inhx32, "raw" => Self::Raw, "source" => Self::Source, - _ => fatal!("Unknown format '{string}', expected 'debug', 'inhx', 'inhx32', 'raw', or 'source'. "), + _ => fatal!("Unknown format '{string}', expected 'debug', 'inhx', 'inhx32', 'raw', or 'source'"), } } } |