Simplify example usage of Magnet struct

This commit is contained in:
Raphael Nestler 2021-05-31 15:31:49 +02:00
parent 4e26974f59
commit 0a8dd9a961
2 changed files with 2 additions and 12 deletions

View File

@ -85,12 +85,7 @@ From a Magnet struct, you can generate a magnet string again
hash_type: "sha1".to_string(), hash_type: "sha1".to_string(),
xt: "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed".to_string(), xt: "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed".to_string(),
xl: 1234567890, xl: 1234567890,
tr: tr: vec!["https://example.com/".to_string()],
{
let mut tr_vec = Vec::new();
tr_vec.push("https://example.com/".to_string());
tr_vec
},
kt: "cool+stuff".to_string(), kt: "cool+stuff".to_string(),
ws: String::new(), ws: String::new(),
acceptable_source: String::new(), acceptable_source: String::new(),

View File

@ -78,12 +78,7 @@ const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)[A-Za-z0-9!@#$%^:*<>,?/()_+=.{}\\
/// hash_type: "sha1".to_string(), /// hash_type: "sha1".to_string(),
/// xt: "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed".to_string(), /// xt: "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed".to_string(),
/// xl: 1234567890, /// xl: 1234567890,
/// tr: /// tr: vec!["https://example.com/".to_string()],
/// {
/// let mut tr_vec = Vec::new();
/// tr_vec.push("https://example.com/".to_string());
/// tr_vec
/// },
/// kt: "cool+stuff".to_string(), /// kt: "cool+stuff".to_string(),
/// ws: String::new(), /// ws: String::new(),
/// acceptable_source: String::new(), /// acceptable_source: String::new(),