Fix Query type docs
`give` no longer exists, `compute` is used to generate query results now.
This commit is contained in:
parent
234c9f21d9
commit
5ddfbc2e2b
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ use std::mem;
|
||||||
use syntax::{self, ast};
|
use syntax::{self, ast};
|
||||||
|
|
||||||
/// Represent the result of a query.
|
/// Represent the result of a query.
|
||||||
/// This result can be stolen with the `take` method and returned with the `give` method.
|
/// This result can be stolen with the `take` method and generated with the `compute` method.
|
||||||
pub struct Query<T> {
|
pub struct Query<T> {
|
||||||
result: RefCell<Option<Result<T>>>,
|
result: RefCell<Option<Result<T>>>,
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ impl<T> Query<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Takes ownership of the query result. Further attempts to take or peek the query
|
/// Takes ownership of the query result. Further attempts to take or peek the query
|
||||||
/// result will panic unless it is returned by calling the `give` method.
|
/// result will panic unless it is generated by calling the `compute` method.
|
||||||
pub fn take(&self) -> T {
|
pub fn take(&self) -> T {
|
||||||
self.result
|
self.result
|
||||||
.borrow_mut()
|
.borrow_mut()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue