forked from pierre/GrammalecteClient
Compare commits
5 Commits
5cce702f03
...
1b31a5d060
Author | SHA1 | Date | |
---|---|---|---|
|
1b31a5d060 | ||
|
738ece6f92 | ||
|
c7b111a53e | ||
|
9a84a9b749 | ||
|
c0854cfb69 |
1453
Cargo.lock
generated
1453
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -14,10 +14,10 @@ categories = ["text-processing"]
|
||||
|
||||
[dependencies]
|
||||
serde_json = "1.0.96"
|
||||
reqwest = { version = "0.11.18", features = ["json"] }
|
||||
reqwest = { version = "0.12.4", features = ["json"] }
|
||||
serde = { version = "1.0.163", features = ["derive"] }
|
||||
log = "0.4.17"
|
||||
zip = { version = "0.6.3", optional = true }
|
||||
zip = { version = "2.1.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 }
|
||||
@ -27,5 +27,5 @@ thiserror = "1.0.61"
|
||||
embedded-server = ["zip", "mktemp", "rand", "port_scanner"]
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = "0.10.0"
|
||||
env_logger = "0.11.3"
|
||||
tokio = { version = "1.28.1", features = ["full"] }
|
||||
|
@ -305,6 +305,7 @@ pub struct SuggestResult {
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum Error {
|
||||
#[cfg(feature = "embedded-server")]
|
||||
#[error("Grammalecte-server failed to start")]
|
||||
ServerStartFailed(#[from] server::Error),
|
||||
|
||||
@ -410,7 +411,7 @@ impl GrammalecteClient {
|
||||
let mut params = HashMap::new();
|
||||
params.insert("token", token);
|
||||
|
||||
Ok(reqwest::Client::new()
|
||||
reqwest::Client::new()
|
||||
.post(&url)
|
||||
.form(¶ms)
|
||||
.send()
|
||||
@ -418,7 +419,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