Merge pull request #8 from rnestler/simplify-example

Simplify example usage of Magnet struct
This commit is contained in:
William Batista 2021-05-31 11:21:13 -04:00 committed by GitHub
commit 473cd856ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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(),
xt: "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed".to_string(),
xl: 1234567890,
tr:
{
let mut tr_vec = Vec::new();
tr_vec.push("https://example.com/".to_string());
tr_vec
},
tr: vec!["https://example.com/".to_string()],
kt: "cool+stuff".to_string(),
ws: 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(),
/// xt: "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed".to_string(),
/// xl: 1234567890,
/// tr:
/// {
/// let mut tr_vec = Vec::new();
/// tr_vec.push("https://example.com/".to_string());
/// tr_vec
/// },
/// tr: vec!["https://example.com/".to_string()],
/// kt: "cool+stuff".to_string(),
/// ws: String::new(),
/// acceptable_source: String::new(),