]> git.proxmox.com Git - proxmox.git/commitdiff
proxmox-router: fix glob-import of anyhow
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 13 Dec 2021 07:13:05 +0000 (08:13 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 13 Dec 2021 07:13:13 +0000 (08:13 +0100)
will break usage of the `Result::Ok()' with anyhow 1.0.49+ as that
added a new Ok helper, so a glob-import would make that shadow the
core one.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-router/src/cli/shellword.rs
proxmox-router/src/router.rs

index 4adf51d29f4ab15b482b1d062d1d8e97f5d803aa..68402bff80db5273f02c47752288c8ef84a1e5e6 100644 (file)
@@ -1,4 +1,4 @@
-use anyhow::*;
+use anyhow::{bail, Error};
 
 /// Shell quote type
 pub use rustyline::completion::Quote;
index 19d23890bbe00c810ebeb83c211927027e9fbd37..a469891cbe973e9db65016a8a6695052e449b46e 100644 (file)
@@ -19,7 +19,7 @@ use crate::RpcEnvironment;
 ///
 /// Most API handler are synchronous. Use this to define such handler:
 /// ```
-/// # use anyhow::*;
+/// # use anyhow::Error;
 /// # use serde_json::{json, Value};
 /// use proxmox_router::{ApiHandler, ApiMethod, RpcEnvironment};
 /// use proxmox_schema::ObjectSchema;