mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-28 21:50:26 +08:00
cli: Implement pretty diffs with highlighting
Implements a new kind of diff output that includes syntax highlighting. This type of diff will be used for code review.
This commit is contained in:
@@ -148,7 +148,12 @@ pub trait Decode: Sized {
|
||||
|
||||
/// Decode from a string input.
|
||||
fn parse(s: &str) -> Result<Self, Error> {
|
||||
let mut r = io::BufReader::new(s.as_bytes());
|
||||
Self::from_bytes(s.as_bytes())
|
||||
}
|
||||
|
||||
/// Decode from a string input.
|
||||
fn from_bytes(bytes: &[u8]) -> Result<Self, Error> {
|
||||
let mut r = io::BufReader::new(bytes);
|
||||
Self::decode(&mut r)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user