mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 07:14:50 +01:00
fix: api doesn't really require woot or similar
This commit is contained in:
parent
f706237828
commit
4fdd2a79c4
2 changed files with 2 additions and 1 deletions
|
@ -32,7 +32,7 @@ tonic-build = "0.9"
|
|||
|
||||
[features]
|
||||
default = []
|
||||
api = ["woot", "dep:tokio", "dep:async-trait"]
|
||||
api = ["dep:async-trait"]
|
||||
woot = ["dep:codemp-woot", "dep:similar"]
|
||||
proto = ["dep:prost", "dep:tonic", "dep:uuid"]
|
||||
client = ["proto", "api", "dep:tokio", "dep:tokio-stream", "dep:uuid", "dep:md5", "dep:serde_json", "dep:dashmap", "dep:postcard"]
|
||||
|
|
|
@ -30,6 +30,7 @@ pub struct TextChange {
|
|||
}
|
||||
|
||||
impl TextChange {
|
||||
#[cfg(feature = "woot")]
|
||||
/// create a new TextChange from the difference of given strings
|
||||
pub fn from_diff(before: &str, after: &str) -> TextChange {
|
||||
let diff = similar::TextDiff::from_chars(before, after);
|
||||
|
|
Loading…
Reference in a new issue