Skip to content

Commit 673a406

Browse files
committed
Adjusting based on PR feedback
1 parent a84286c commit 673a406

File tree

3 files changed

+11
-18
lines changed

3 files changed

+11
-18
lines changed

components/suggest/src/benchmarks/client.rs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,19 @@ impl RemoteSettingsBenchmarkClient {
3838
},
3939
);
4040
let client = service.make_client(collection.name().to_string());
41-
let records = client.get_records(true);
42-
if let Some(records) = records {
43-
for r in &records {
44-
if let Some(a) = &r.attachment {
45-
self.attachments
46-
.insert(a.location.clone(), client.get_attachment(r)?);
47-
}
41+
let records = client.get_records(true).unwrap();
42+
for r in &records {
43+
if let Some(a) = &r.attachment {
44+
self.attachments
45+
.insert(a.location.clone(), client.get_attachment(r)?);
4846
}
49-
self.records.extend(
50-
records
51-
.into_iter()
52-
.filter_map(|r| rs::Record::new(r, collection).ok()),
53-
);
54-
Ok(())
55-
} else {
56-
Err(Error::MissingRecords)
5747
}
48+
self.records.extend(
49+
records
50+
.into_iter()
51+
.filter_map(|r| rs::Record::new(r, collection).ok()),
52+
);
53+
Ok(())
5854
}
5955

6056
pub fn attachment_size_by_record_type(&self) -> Vec<(rs::SuggestRecordType, usize)> {

components/suggest/src/error.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ pub enum Error {
2626
#[error("Error from Remote Settings: {0}")]
2727
RemoteSettings(#[from] RemoteSettingsError),
2828

29-
#[error("Remote settings has no records for this collection")]
30-
MissingRecords,
31-
3229
#[error("Remote settings record is missing an attachment (id: u64)")]
3330
MissingAttachment(String),
3431

4 KB
Binary file not shown.

0 commit comments

Comments
 (0)