Skip to content

Commit

Permalink
Merge pull request #28 from breezy-team/unused-import
Browse files Browse the repository at this point in the history
Remove unused import
  • Loading branch information
jelmer authored Nov 17, 2024
2 parents 95c0f54 + 640c924 commit c177b92
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions src/ed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ pub struct EdPatch {
impl crate::ContentPatch for EdPatch {
fn apply_exact(&self, orig: &[u8]) -> Result<Vec<u8>, crate::ApplyError> {
let lines = splitlines(orig).collect::<Vec<_>>();
let result = self
.apply(&lines)
.map_err(|e| crate::ApplyError::Conflict(e))?;
let result = self.apply(&lines).map_err(crate::ApplyError::Conflict)?;
Ok(result)
}
}
Expand All @@ -27,7 +25,7 @@ impl EdPatch {
assert_eq!(start, end);
let existing = match data.get(start - 1) {
Some(existing) => existing,
None => return Err(format!("line {} does not exist", start).into()),
None => return Err(format!("line {} does not exist", start)),
};
if existing != expected {
return Err(format!(
Expand Down
1 change: 0 additions & 1 deletion src/unified.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Parsing of unified patches
use crate::{ContentPatch, SingleFilePatch};
use regex::bytes::Regex;
use std::num::ParseIntError;

/// Errors that can occur while parsing a patch
Expand Down

0 comments on commit c177b92

Please sign in to comment.