diff options
| author | Fuwn <[email protected]> | 2022-05-18 01:52:36 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-05-18 01:52:36 +0000 |
| commit | 11405ce0600d61f3772a7efe7fbd3de4cc2bf892 (patch) | |
| tree | 24ebda9cc59ae51b4e87fdde688fe009eaf420af /examples | |
| parent | chore(makefile): use --all-features (diff) | |
| download | germ-11405ce0600d61f3772a7efe7fbd3de4cc2bf892.tar.xz germ-11405ce0600d61f3772a7efe7fbd3de4cc2bf892.zip | |
fix: global clippy lint fixes
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/html.rs | 5 | ||||
| -rw-r--r-- | examples/markdown.rs | 4 | ||||
| -rw-r--r-- | examples/meta.rs | 2 | ||||
| -rw-r--r-- | examples/request.rs | 2 |
4 files changed, 5 insertions, 8 deletions
diff --git a/examples/html.rs b/examples/html.rs index 5e1821d..541c01e 100644 --- a/examples/html.rs +++ b/examples/html.rs @@ -48,10 +48,7 @@ That was a link without text."#; fn main() { std::fs::write( "examples/convert.html", - germ::convert::convert_from_string( - EXAMPLE_GEMTEXT, - germ::convert::Target::HTML, - ), + germ::convert::from_string(EXAMPLE_GEMTEXT, &germ::convert::Target::HTML), ) .expect("could not write to file"); } diff --git a/examples/markdown.rs b/examples/markdown.rs index 249c3b9..c14cdc5 100644 --- a/examples/markdown.rs +++ b/examples/markdown.rs @@ -48,9 +48,9 @@ That was a link without text."#; fn main() { std::fs::write( "examples/convert.md", - germ::convert::convert_from_string( + germ::convert::from_string( EXAMPLE_GEMTEXT, - germ::convert::Target::Markdown, + &germ::convert::Target::Markdown, ), ) .expect("could not write to file"); diff --git a/examples/meta.rs b/examples/meta.rs index 75d894b..a9f4077 100644 --- a/examples/meta.rs +++ b/examples/meta.rs @@ -19,6 +19,6 @@ fn main() { println!( "{:?}", - germ::meta::Meta::from_str("text/gemini; hi=2; hi2=string=2") + germ::meta::Meta::from_string("text/gemini; hi=2; hi2=string=2") ) } diff --git a/examples/request.rs b/examples/request.rs index 5791896..e33710f 100644 --- a/examples/request.rs +++ b/examples/request.rs @@ -17,7 +17,7 @@ // SPDX-License-Identifier: GPL-3.0-only fn main() { - match germ::request::request(url::Url::parse("gemini://fuwn.me").unwrap()) { + match germ::request::request(&url::Url::parse("gemini://fuwn.me").unwrap()) { Ok(response) => println!("{:?}", response), Err(_) => {} } |