mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 23:34:49 +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]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
api = ["woot", "dep:tokio", "dep:async-trait"]
|
api = ["dep:async-trait"]
|
||||||
woot = ["dep:codemp-woot", "dep:similar"]
|
woot = ["dep:codemp-woot", "dep:similar"]
|
||||||
proto = ["dep:prost", "dep:tonic", "dep:uuid"]
|
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"]
|
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 {
|
impl TextChange {
|
||||||
|
#[cfg(feature = "woot")]
|
||||||
/// create a new TextChange from the difference of given strings
|
/// create a new TextChange from the difference of given strings
|
||||||
pub fn from_diff(before: &str, after: &str) -> TextChange {
|
pub fn from_diff(before: &str, after: &str) -> TextChange {
|
||||||
let diff = similar::TextDiff::from_chars(before, after);
|
let diff = similar::TextDiff::from_chars(before, after);
|
||||||
|
|
Loading…
Reference in a new issue