mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-22 18:17:39 +08:00
Fix clippy issues
This commit is contained in:
parent
6993924f32
commit
798aa4ee92
@ -113,7 +113,7 @@ impl V3Reader {
|
||||
Ok(self.index_uuid.iter().map(|index| -> Result<_> {
|
||||
V3IndexReader::new(
|
||||
&self.dump.path().join("indexes").join(index.uuid.to_string()),
|
||||
&index,
|
||||
index,
|
||||
BufReader::new(
|
||||
File::open(self.dump.path().join("updates").join("data.jsonl")).unwrap(),
|
||||
),
|
||||
@ -150,7 +150,6 @@ impl V3Reader {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct V3IndexReader {
|
||||
metadata: IndexMetadata,
|
||||
settings: Settings<Checked>,
|
||||
@ -169,7 +168,7 @@ impl V3IndexReader {
|
||||
for line in tasks.lines() {
|
||||
let task: Task = serde_json::from_str(&line?)?;
|
||||
|
||||
if task.uuid != index_uuid.uuid || !task.is_finished() {
|
||||
if !(task.uuid == index_uuid.uuid && task.is_finished()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -77,11 +77,11 @@ impl UpdateStatus {
|
||||
|
||||
pub fn enqueued_at(&self) -> Option<OffsetDateTime> {
|
||||
match self {
|
||||
UpdateStatus::Processing(u) => Some(u.from.enqueued_at.clone()),
|
||||
UpdateStatus::Enqueued(u) => Some(u.enqueued_at.clone()),
|
||||
UpdateStatus::Processed(u) => Some(u.from.from.enqueued_at.clone()),
|
||||
UpdateStatus::Aborted(u) => Some(u.from.enqueued_at.clone()),
|
||||
UpdateStatus::Failed(u) => Some(u.from.from.enqueued_at.clone()),
|
||||
UpdateStatus::Processing(u) => Some(u.from.enqueued_at),
|
||||
UpdateStatus::Enqueued(u) => Some(u.enqueued_at),
|
||||
UpdateStatus::Processed(u) => Some(u.from.from.enqueued_at),
|
||||
UpdateStatus::Aborted(u) => Some(u.from.enqueued_at),
|
||||
UpdateStatus::Failed(u) => Some(u.from.from.enqueued_at),
|
||||
}
|
||||
}
|
||||
|
||||
@ -89,9 +89,9 @@ impl UpdateStatus {
|
||||
match self {
|
||||
UpdateStatus::Processing(_) => None,
|
||||
UpdateStatus::Enqueued(_) => None,
|
||||
UpdateStatus::Processed(u) => Some(u.processed_at.clone()),
|
||||
UpdateStatus::Processed(u) => Some(u.processed_at),
|
||||
UpdateStatus::Aborted(_) => None,
|
||||
UpdateStatus::Failed(u) => Some(u.failed_at.clone()),
|
||||
UpdateStatus::Failed(u) => Some(u.failed_at),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user