mirror of
https://github.com/sigoden/dufs.git
synced 2026-04-09 00:59:02 +03:00
chore: fix typos and clippy (#379)
This commit is contained in:
@@ -26,7 +26,7 @@ macro_rules! fetch {
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn retrieve_index_paths(content: &str) -> IndexSet<String> {
|
||||
let value = retrive_json(content).unwrap();
|
||||
let value = retrieve_json(content).unwrap();
|
||||
let paths = value
|
||||
.get("paths")
|
||||
.unwrap()
|
||||
@@ -47,8 +47,8 @@ pub fn retrieve_index_paths(content: &str) -> IndexSet<String> {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn retrive_edit_file(content: &str) -> Option<bool> {
|
||||
let value = retrive_json(content)?;
|
||||
pub fn retrieve_edit_file(content: &str) -> Option<bool> {
|
||||
let value = retrieve_json(content)?;
|
||||
let value = value.get("editable").unwrap();
|
||||
Some(value.as_bool().unwrap())
|
||||
}
|
||||
@@ -60,7 +60,7 @@ pub fn encode_uri(v: &str) -> String {
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn retrive_json(content: &str) -> Option<Value> {
|
||||
pub fn retrieve_json(content: &str) -> Option<Value> {
|
||||
let lines: Vec<&str> = content.lines().collect();
|
||||
let line = lines.iter().find(|v| v.contains("DATA ="))?;
|
||||
let line_col = line.find("DATA =").unwrap() + 6;
|
||||
|
||||
Reference in New Issue
Block a user