22
22
//! use watchman_client::prelude::*;
23
23
//! #[tokio::main]
24
24
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
25
- //! let mut client = Connector::new().connect().await?;
26
- //! let resolved = client
27
- //! .resolve_root(CanonicalPath::canonicalize(".")?)
28
- //! .await?;
25
+ //! let mut client = Connector::new().connect().await?;
26
+ //! let resolved = client
27
+ //! .resolve_root(CanonicalPath::canonicalize(".")?)
28
+ //! .await?;
29
29
//!
30
- //! // Basic globs -> names
31
- //! let files = client.glob(&resolved, &["**/*.rs"]).await?;
32
- //! println!("files: {:#?}", files);
33
- //! Ok(())
30
+ //! // Basic globs -> names
31
+ //! let files = client.glob(&resolved, &["**/*.rs"]).await?;
32
+ //! println!("files: {:#?}", files);
33
+ //! Ok(())
34
34
//! }
35
35
//! ```
36
36
#![ deny( warnings) ]
@@ -957,8 +957,8 @@ impl Client {
957
957
/// [NameOnly](struct.NameOnly.html) struct.
958
958
///
959
959
/// ```
960
- /// use watchman_client::prelude::*;
961
960
/// use serde::Deserialize;
961
+ /// use watchman_client::prelude::*;
962
962
///
963
963
/// query_result_type! {
964
964
/// struct NameAndType {
@@ -968,20 +968,20 @@ impl Client {
968
968
/// }
969
969
///
970
970
/// async fn query(
971
- /// client: &mut Client,
972
- /// resolved: &ResolvedRoot
971
+ /// client: &mut Client,
972
+ /// resolved: &ResolvedRoot,
973
973
/// ) -> Result<(), Box<dyn std::error::Error>> {
974
- /// let response: QueryResult<NameAndType> = client
975
- /// .query(
976
- /// &resolved,
977
- /// QueryRequestCommon {
978
- /// glob: Some(vec!["**/*.rs".to_string()]),
979
- /// ..Default::default()
980
- /// },
981
- /// )
982
- /// .await?;
983
- /// println!("response: {:#?}", response);
984
- /// Ok(())
974
+ /// let response: QueryResult<NameAndType> = client
975
+ /// .query(
976
+ /// &resolved,
977
+ /// QueryRequestCommon {
978
+ /// glob: Some(vec!["**/*.rs".to_string()]),
979
+ /// ..Default::default()
980
+ /// },
981
+ /// )
982
+ /// .await?;
983
+ /// println!("response: {:#?}", response);
984
+ /// Ok(())
985
985
/// }
986
986
/// ```
987
987
///
0 commit comments