Skip to content

Commit

Permalink
Update to 2021 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Mar 25, 2024
1 parent a90f400 commit c30043d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
documentation = "https://docs.rs/ammonia/"
repository = "https://github.com/rust-ammonia/ammonia"
categories = [ "web-programming", "text-processing" ]
edition = "2018"
edition = "2021"
rust-version = "1.60"

[dependencies]
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ impl<'a> Builder<'a> {
/// use ammonia::{Builder, Url, UrlRelative};
/// # use std::error::Error;
///
/// # fn do_main() -> Result<(), Box<Error>> {
/// # fn do_main() -> Result<(), Box<dyn Error>> {
/// let input = "<!-- comments will be stripped -->This is an <a href=.>Ammonia</a> example using <a href=struct.Builder.html#method.new onclick=xss>the <code onmouseover=xss>new()</code> function</a>.";
/// let output = "This is an <a href=\"https://docs.rs/ammonia/1.0/ammonia/\" rel=\"noopener noreferrer\">Ammonia</a> example using <a href=\"https://docs.rs/ammonia/1.0/ammonia/struct.Builder.html#method.new\" rel=\"noopener noreferrer\">the <code>new()</code> function</a>.";
///
Expand All @@ -1684,7 +1684,7 @@ impl<'a> Builder<'a> {
/// use ammonia::{Builder, Url, UrlRelative};
/// # use std::error::Error;
///
/// # fn do_main() -> Result<(), Box<Error>> {
/// # fn do_main() -> Result<(), Box<dyn Error>> {
/// let input = "<!-- comments will be stripped -->This is an <a href=.>Ammonia</a> example using <a href=struct.Builder.html#method.new onclick=xss>the <code onmouseover=xss>empty()</code> function</a>.";
/// let output = "This is an Ammonia example using the empty() function.";
///
Expand Down Expand Up @@ -1713,7 +1713,7 @@ impl<'a> Builder<'a> {
/// use ammonia::{Builder, Url, UrlRelative};
/// # use std::error::Error;
///
/// # fn do_main() -> Result<(), Box<Error>> {
/// # fn do_main() -> Result<(), Box<dyn Error>> {
/// let input = "<!-- comments will be stripped -->This is an <a href=.>Ammonia</a> example using <a href=struct.Builder.html#method.new onclick=xss>the <code onmouseover=xss>new()</code> function</a>.";
/// let output = "This is an <a href=\"https://docs.rs/ammonia/1.0/ammonia/\" rel=\"noopener noreferrer\">Ammonia</a> example using <a href=\"https://docs.rs/ammonia/1.0/ammonia/struct.Builder.html#method.new\" rel=\"noopener noreferrer\">the <code>new()</code> function</a>.";
///
Expand Down Expand Up @@ -1743,7 +1743,7 @@ impl<'a> Builder<'a> {
/// use ammonia::Builder;
/// # use std::error::Error;
///
/// # fn do_main() -> Result<(), Box<Error>> {
/// # fn do_main() -> Result<(), Box<dyn Error>> {
/// let a = Builder::new()
/// .clean_from_reader(&b"<!-- no -->"[..])? // notice the `b`
/// .to_string();
Expand Down Expand Up @@ -2817,7 +2817,7 @@ impl Document {
/// use html5ever::serialize::{serialize, SerializeOpts};
///
/// # use std::error::Error;
/// # fn do_main() -> Result<(), Box<Error>> {
/// # fn do_main() -> Result<(), Box<dyn Error>> {
/// let input = "<a>one link</a> and <a>one more</a>";
/// let expected = "<a>one more</a> and <a>one link</a>";
///
Expand Down

0 comments on commit c30043d

Please sign in to comment.