forked from pierre/GrammalecteClient
Compare commits
3 Commits
1b31a5d060
...
5cce702f03
Author | SHA1 | Date | |
---|---|---|---|
|
5cce702f03 | ||
|
f1b5c7d4f8 | ||
|
c4ad9973ef |
1439
Cargo.lock
generated
1439
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -14,18 +14,18 @@ categories = ["text-processing"]
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.96"
|
||||
reqwest = { version = "0.12.4", features = ["json"] }
|
||||
reqwest = { version = "0.11.18", features = ["json"] }
|
||||
serde = { version = "1.0.163", features = ["derive"] }
|
||||
log = "0.4.17"
|
||||
zip = { version = "2.1.3", optional = true }
|
||||
zip = { version = "0.6.3", optional = true }
|
||||
mktemp = { version = "0.5.0", optional = true }
|
||||
rand = { version = "0.8.5", optional = true }
|
||||
port_scanner = { version = "0.1.5", optional = true }
|
||||
port_scanner = {version = "0.1.5", optional = true}
|
||||
thiserror = "1.0.61"
|
||||
|
||||
[features]
|
||||
embedded-server = ["zip", "mktemp", "rand", "port_scanner"]
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.11.3"
|
||||
env_logger = "0.10.0"
|
||||
tokio = { version = "1.28.1", features = ["full"] }
|
||||
|
@ -305,7 +305,6 @@ pub struct SuggestResult {
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[cfg(feature = "embedded-server")]
|
||||
#[error("Grammalecte-server failed to start")]
|
||||
ServerStartFailed(#[from] server::Error),
|
||||
|
||||
@ -411,7 +410,7 @@ impl GrammalecteClient {
|
||||
let mut params = HashMap::new();
|
||||
params.insert("token", token);
|
||||
|
||||
reqwest::Client::new()
|
||||
Ok(reqwest::Client::new()
|
||||
.post(&url)
|
||||
.form(¶ms)
|
||||
.send()
|
||||
@ -419,7 +418,7 @@ impl GrammalecteClient {
|
||||
.map_err(Error::RequestSendSuggest)?
|
||||
.json()
|
||||
.await
|
||||
.map_err(Error::SuggestDeserialize)
|
||||
.map_err(Error::SuggestDeserialize)?)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user