File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ pub trait Source {
6262
6363 /// Attempts to find the packages that match a dependency request.
6464 ///
65+ /// Usually you should call [`Source::block_until_ready`] somewhere and
66+ /// wait until package informations become available. Otherwise any query
67+ /// may return a [`Poll::Pending`].
68+ ///
6569 /// The `f` argument is expected to get called when any [`Summary`] becomes available.
6670 fn query (
6771 & mut self ,
@@ -70,8 +74,8 @@ pub trait Source {
7074 f : & mut dyn FnMut ( Summary ) ,
7175 ) -> Poll < CargoResult < ( ) > > ;
7276
73- /// A helper function that collects and returns the result from
74- /// [`Source::query`] as a list of [`Summary`] items when available.
77+ /// Gathers the result from [`Source::query`] as a list of [`Summary`] items
78+ /// when they become available.
7579 fn query_vec ( & mut self , dep : & Dependency , kind : QueryKind ) -> Poll < CargoResult < Vec < Summary > > > {
7680 let mut ret = Vec :: new ( ) ;
7781 self . query ( dep, kind, & mut |s| ret. push ( s) ) . map_ok ( |_| ret)
You can’t perform that action at this time.
0 commit comments