Skip to content

Commit 29bcb62

Browse files
authored
Patch the README of examples (#47)
* perf(example): patch the README of examples * fix(clippy): fix verbose code in examples
1 parent c148ff2 commit 29bcb62

File tree

20 files changed

+318
-415
lines changed

20 files changed

+318
-415
lines changed

Cargo.lock

Lines changed: 187 additions & 145 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/backend/src/html.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! HTML Templates
22
/// Production HTML template
3-
pub const HTML_TEMPLATE: &'static str = r#"
3+
pub const HTML_TEMPLATE: &str = r#"
44
<script type="module">
55
import init, { ${run} } from '${entry}';
66
(async () => {
@@ -11,7 +11,7 @@ pub const HTML_TEMPLATE: &'static str = r#"
1111
"#;
1212

1313
/// Development HTML template
14-
pub const DEV_HTML_TEMPLATE: &'static str = r#"
14+
pub const DEV_HTML_TEMPLATE: &str = r#"
1515
<script type="module">
1616
import init, { ${run} } from '${entry}';
1717
(async () => {

crates/backend/src/manifest.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub struct Crate {
4141
impl Crate {
4242
/// New crate data
4343
pub fn new() -> Result<Crate, Error> {
44-
let root = env::current_dir().unwrap_or(PathBuf::from("."));
44+
let root = env::current_dir().unwrap_or_else(|_| PathBuf::from("."));
4545
let manifest = root.join("Cargo.toml");
4646
let data = MetadataCommand::new()
4747
.manifest_path(&manifest)
@@ -69,7 +69,7 @@ impl Crate {
6969
idx,
7070
data,
7171
debug: true,
72-
root: root.to_path_buf(),
72+
root: root.clone(),
7373
wasm: root.join("pkg"),
7474
})
7575
}

crates/core/src/err.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ impl Error {
2020
IE: Clone,
2121
{
2222
if let Err(e) = r {
23-
return Err(Error::from(E::from(e.clone()).into()));
23+
Err(E::from(e.clone()).into())
2424
} else {
2525
Ok(())
2626
}

crates/epm/Cargo.lock

Lines changed: 0 additions & 236 deletions
This file was deleted.

crates/epm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "epm"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
authors = ["clearloop <[email protected]>"]
55
edition = "2018"
66
description = "The Elvis Package Manager"

0 commit comments

Comments
 (0)