This commit is contained in:
Adrien Guillo
2023-01-10 10:49:13 -05:00
committed by GitHub
parent 8312c882a5
commit 14222a47a3
3 changed files with 8 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ impl LockError {
/// Error that may occur when opening a directory
#[derive(Debug, Clone, Error)]
pub enum OpenDirectoryError {
/// The underlying directory does not exists.
/// The underlying directory does not exist.
#[error("Directory does not exist: '{0}'.")]
DoesNotExist(PathBuf),
/// The path exists but is not a directory.
@@ -151,8 +151,8 @@ impl fmt::Debug for Incompatibility {
/// Error that may occur when accessing a file read
#[derive(Debug, Clone, Error)]
pub enum OpenReadError {
/// The file does not exists.
#[error("Files does not exists: {0:?}")]
/// The file does not exist.
#[error("Files does not exist: {0:?}")]
FileDoesNotExist(PathBuf),
/// Any kind of io::Error.
#[error(
@@ -181,8 +181,8 @@ impl OpenReadError {
/// Error that may occur when trying to delete a file
#[derive(Debug, Clone, Error)]
pub enum DeleteError {
/// The file does not exists.
#[error("File does not exists: '{0}'.")]
/// The file does not exist.
#[error("File does not exist: '{0}'.")]
FileDoesNotExist(PathBuf),
/// Any kind of IO error that happens when
/// interacting with the underlying IO device.

View File

@@ -36,7 +36,7 @@ pub enum QueryParserError {
#[error("Unsupported query: {0}")]
UnsupportedQuery(String),
/// The query references a field that is not in the schema
#[error("Field does not exists: '{0}'")]
#[error("Field does not exist: '{0}'")]
FieldDoesNotExist(String),
/// The query contains a term for a `u64` or `i64`-field, but the value
/// is neither.

View File

@@ -209,7 +209,7 @@ impl ArenaHashMap {
}
}
/// `update` create a new entry for a given key if it does not exists
/// `update` create a new entry for a given key if it does not exist
/// or updates the existing entry.
///
/// The actual logic for this update is define in the `updater`
@@ -237,7 +237,7 @@ impl ArenaHashMap {
let bucket = probe.next_probe();
let kv: KeyValue = self.table[bucket];
if kv.is_empty() {
// The key does not exists yet.
// The key does not exist yet.
let val = updater(None);
let num_bytes = std::mem::size_of::<u16>() + key.len() + std::mem::size_of::<V>();
let key_addr = self.memory_arena.allocate_space(num_bytes);