Compare commits
1
Commits
No files matched your search
@@ -502,3 +502,4 @@ mod tests {
|
|||||||
assert_eq!(aligned_str2, "test");
|
assert_eq!(aligned_str2, "test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pub mod wrapper_;
|
||||||
+1
-10
@@ -2,16 +2,7 @@ use std::fmt::Display;
|
|||||||
|
|
||||||
use lda_strdist::*;
|
use lda_strdist::*;
|
||||||
|
|
||||||
struct EditOperationVec<'e>(&'e Vec<EditOperation>);
|
use wrapper_::EditOperationVec;
|
||||||
|
|
||||||
impl Display for EditOperationVec<'_> {
|
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
||||||
for (i, op) in self.0.iter().enumerate() {
|
|
||||||
writeln!(f, "Step {}: {}", i + 1, op)?;
|
|
||||||
}
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let str1 = "AGTACGCA";
|
let str1 = "AGTACGCA";
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
use crate::EditOperation;
|
||||||
|
|
||||||
|
pub struct EditOperationVec<'e>(pub &'e Vec<EditOperation>);
|
||||||
|
|
||||||
|
impl std::fmt::Display for EditOperationVec<'_> {
|
||||||
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
for (i, op) in self.0.iter().enumerate() {
|
||||||
|
writeln!(f, "Step {}: {}", i + 1, op)?;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user