mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
add comment
This commit is contained in:
parent
c83248741b
commit
03d97da6c7
@ -24,7 +24,7 @@ impl Memory {
|
|||||||
/// * validate record with same key does not exist yet
|
/// * validate record with same key does not exist yet
|
||||||
pub fn add(&self, request: String, id: i64) -> Result<(), Error> {
|
pub fn add(&self, request: String, id: i64) -> Result<(), Error> {
|
||||||
match self.index.borrow_mut().insert(request, id) {
|
match self.index.borrow_mut().insert(request, id) {
|
||||||
Some(_) => Err(Error::Overwrite),
|
Some(_) => Err(Error::Overwrite), // @TODO prevent?
|
||||||
None => Ok(()),
|
None => Ok(()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user