mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-07-22 23:38:10 -07:00
Replace unnecessary File::options with File::create
This commit is contained in:
committed by
Will Greenberg
parent
46a5bf8a84
commit
b41f61bfa6
@@ -156,17 +156,11 @@ impl RecordingStore {
|
|||||||
}
|
}
|
||||||
let new_entry = ManifestEntry::new();
|
let new_entry = ManifestEntry::new();
|
||||||
let qmdl_filepath = new_entry.get_qmdl_filepath(&self.path);
|
let qmdl_filepath = new_entry.get_qmdl_filepath(&self.path);
|
||||||
let qmdl_file = File::options()
|
let qmdl_file = File::create(&qmdl_filepath)
|
||||||
.create(true)
|
|
||||||
.write(true)
|
|
||||||
.open(&qmdl_filepath)
|
|
||||||
.await
|
.await
|
||||||
.map_err(RecordingStoreError::CreateFileError)?;
|
.map_err(RecordingStoreError::CreateFileError)?;
|
||||||
let analysis_filepath = new_entry.get_analysis_filepath(&self.path);
|
let analysis_filepath = new_entry.get_analysis_filepath(&self.path);
|
||||||
let analysis_file = File::options()
|
let analysis_file = File::create(&analysis_filepath)
|
||||||
.create(true)
|
|
||||||
.write(true)
|
|
||||||
.open(&analysis_filepath)
|
|
||||||
.await
|
.await
|
||||||
.map_err(RecordingStoreError::CreateFileError)?;
|
.map_err(RecordingStoreError::CreateFileError)?;
|
||||||
self.manifest.entries.push(new_entry);
|
self.manifest.entries.push(new_entry);
|
||||||
|
|||||||
Reference in New Issue
Block a user