From e4e1d3283f3ecbbcf9a80684ec0e0f5c773b9a9d Mon Sep 17 00:00:00 2001 From: William Batista Date: Tue, 16 Feb 2021 14:07:38 -0500 Subject: [PATCH] Renamed crate in documentation I'm an idiot and forgot to rename the library in the documentation --- README.md | 12 ++++++------ src/lib.rs | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4fd4bd0..20aa2ba 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # The Rust Magnet URL Parser! # Intro -parse-magnet-rs has the goal of, as you may have guessed, parsing the parts of magnets. It does +magnet-url-rs has the goal of, as you may have guessed, parsing the parts of magnets. It does this using some relatively simple regexes. The crate is designed to be very simple and efficient, with a lot of flexibility. It's also designed to be relatively easy to handle errors, and modification of it's source is greatly encouraged through documentation and it's license. @@ -9,7 +9,7 @@ modification of it's source is greatly encouraged through documentation and it's Parsing a magnet is very simple: ``` - use magnet-url-rs:Magnet; + use magnet-url:Magnet; let magnet_url = Magnet::new("magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent"); ``` @@ -17,7 +17,7 @@ This returns the Magnet struct, which is made up of the fields listed below this access one of these fields is also very simple: ``` - use magnet-url-rs:Magnet; + use magnet-url:Magnet; let magnet_url = Magnet::new("magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent"); println!("{:?}", magnet_url.dn); ``` @@ -25,7 +25,7 @@ access one of these fields is also very simple: If you'd like to modify parts of the magnet_url to customize it, that can be done as well! ``` - use magnet-url-rs:Magnet; + use magnet-url:Magnet; let mut magnet_url = Magnet::new("magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent"); println!("{:?}", magnet_url.dn); magnet_url.dn = String::from("hello_world"); @@ -36,7 +36,7 @@ In fact, you can construct your own magnet url as well, as long as you fill in a parameters! ``` - use magnet-url-rs:Magnet; + use magnet-url:Magnet; let magnet_url = //Note, this magnet won't actually download, sorry :/ Magnet { @@ -56,4 +56,4 @@ parameters! mt: String::new(), }; -``` \ No newline at end of file +``` diff --git a/src/lib.rs b/src/lib.rs index 66de8ce..5a5c893 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,7 @@ const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{ ///# Intro -/// magnet-url-rs has the goal of, as you may have guessed, parsing the parts of magnets. It does +/// magnet-url has the goal of, as you may have guessed, parsing the parts of magnets. It does /// this using some relatively simple regexes. The crate is designed to be very simple and efficient, /// with a lot of flexibility. It's also designed to be relatively easy to handle errors, and /// modification of it's source is greatly encouraged through documentation and it's license. @@ -25,7 +25,7 @@ const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{ /// Parsing a magnet is very simple: /// /// ``` -/// use magnet-url-rs:Magnet; +/// use magnet-url:Magnet; /// let magnet_url = Magnet::new("magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent"); /// ``` /// @@ -33,7 +33,7 @@ const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{ /// access one of these fields is also very simple: /// /// ``` -/// use magnet-url-rs:Magnet; +/// use magnet-url:Magnet; /// let magnet_url = Magnet::new("magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent"); /// println!("{:?}", magnet_url.dn); /// ``` @@ -41,7 +41,7 @@ const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{ /// If you'd like to modify parts of the magnet_url to customize it, that can be done as well! /// /// ``` -/// use magnet-url-rs:Magnet; +/// use magnet-url:Magnet; /// let mut magnet_url = Magnet::new("magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F&xs=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent"); /// println!("{:?}", magnet_url.dn); /// magnet_url.dn = String::from("hello_world"); @@ -52,7 +52,7 @@ const MANIFEST_TOPIC_RE_STR: &str = r"mt=((\w+)://[A-Za-z0-9!@#$%^:*<>,?/()_+=.{ /// parameters! /// /// ``` -/// use magnet-url-rs:Magnet; +/// use magnet-url:Magnet; /// let magnet_url = /// //Note, this magnet won't actually download, sorry :/ /// Magnet {