diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57c48cc2f..5e784a346 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,7 +2,7 @@ env: RUSTFLAGS: -D warnings # coverage collection depends on unstable features. # we want the CI results to all be from the same toolchain, so we set it up here. - RUSTUP_TOOLCHAIN: nightly-2021-03-24 + RUSTUP_TOOLCHAIN: nightly-2021-10-30 on: push: branches: @@ -19,13 +19,6 @@ jobs: steps: - uses: actions/checkout@master - run: rustup install ${{ env.RUSTUP_TOOLCHAIN }} - - name: ensure lockfile up to date - run: cargo generate-lockfile --manifest-path ofl/Cargo.toml - - name: install gnu tar to work around https://github.com/actions/cache/issues/403 - if: matrix.os == 'macos-latest' - run: | - brew install gnu-tar - echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV - uses: actions/cache@v2 with: key: ${{ runner.os }}-ofl-${{ hashFiles('ofl/Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2 @@ -62,11 +55,6 @@ jobs: - name: ensure lockfile up to date run: cargo generate-lockfile - - name: install gnu tar to work around https://github.com/actions/cache/issues/403 - if: matrix.os == 'macos-latest' - run: | - brew install gnu-tar - echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV - uses: actions/cache@v2 with: key: ${{ runner.os }}-coverage-${{ hashFiles('Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2 @@ -105,11 +93,6 @@ jobs: - name: ensure lockfile up to date run: cargo generate-lockfile - - name: install gnu tar to work around https://github.com/actions/cache/issues/403 - if: matrix.os == 'macos-latest' - run: | - brew install gnu-tar - echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV - uses: actions/cache@v2 with: key: ${{ runner.os }}-dom-${{ hashFiles('Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2 @@ -152,11 +135,6 @@ jobs: - name: ensure lockfile up to date run: cargo generate-lockfile - - name: install gnu tar to work around https://github.com/actions/cache/issues/403 - if: matrix.os == 'macos-latest' - run: | - brew install gnu-tar - echo PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH" >> $GITHUB_ENV - uses: actions/cache@v2 with: key: ${{ runner.os }}-website-${{ hashFiles('Cargo.lock') }}-${{ env.RUSTUP_TOOLCHAIN }}-2 diff --git a/dom/augdom/src/rsdom.rs b/dom/augdom/src/rsdom.rs index bc97f2a60..c8997d007 100644 --- a/dom/augdom/src/rsdom.rs +++ b/dom/augdom/src/rsdom.rs @@ -64,7 +64,7 @@ impl crate::Dom for Rc { } VirtData::Text(t) => { writer - .write_event(Event::Text(BytesText::from_plain_str(&t))) + .write_event(Event::Text(BytesText::from_plain_str(t))) .expect("writing text node"); } } diff --git a/dom/prettiest/src/lib.rs b/dom/prettiest/src/lib.rs index abf1cc828..7177357d5 100644 --- a/dom/prettiest/src/lib.rs +++ b/dom/prettiest/src/lib.rs @@ -161,7 +161,7 @@ impl Debug for Prettified { continue; } - if let Ok(value) = Reflect::get(&obj, &raw_key) { + if let Ok(value) = Reflect::get(obj, &raw_key) { props_seen.insert(key.clone()); if value.is_function() { functions.insert(key); diff --git a/dom/src/embed.rs b/dom/src/embed.rs index c0bc194c3..4474e6a49 100644 --- a/dom/src/embed.rs +++ b/dom/src/embed.rs @@ -30,6 +30,7 @@ impl DomLoop { let mut inner = RunLoop::new(Box::new(move || { let parent = CachedNode::new(parent.clone()); + #[allow(clippy::redundant_closure)] // removing the closure syntax makes this FnOnce let new_root = topo::call(|| root()); parent.ensure_child_attached(new_root.to_bind()); diff --git a/mox/src/lib.rs b/mox/src/lib.rs index 528ac5250..8b6614e87 100644 --- a/mox/src/lib.rs +++ b/mox/src/lib.rs @@ -375,7 +375,7 @@ impl ToTokens for MoxExpr { trait NodeConvertError { fn node_convert_error(node: &syn_rsx::Node) -> syn::Error { syn::Error::new( - node_span(&node), + node_span(node), format_args!("Cannot convert {} to {}", node.node_type, std::any::type_name::(),), ) } diff --git a/ofl/src/coverage.rs b/ofl/src/coverage.rs index 12f996184..86e9d1c85 100644 --- a/ofl/src/coverage.rs +++ b/ofl/src/coverage.rs @@ -74,7 +74,7 @@ impl Collect { pub fn run(&self, project_root: impl AsRef) -> Result<(), Error> { let mut command = Command::new("cargo"); command - .env("RUSTFLAGS", "-Zinstrument-coverage") + .env("RUSTFLAGS", "-Zinstrument-coverage -Ccodegen-units=1") .env( "LLVM_PROFILE_FILE", project_root diff --git a/ofl/src/server/inject.rs b/ofl/src/server/inject.rs index 374ca4724..77cbaf93c 100644 --- a/ofl/src/server/inject.rs +++ b/ofl/src/server/inject.rs @@ -40,7 +40,7 @@ where fn inject_script_tag(body: &str) -> Option { lol_html::rewrite_str( - &body, + body, RewriteStrSettings { element_content_handlers: vec![element!("head", |head| { info!("inserting script tag"); diff --git a/ofl/src/versions.rs b/ofl/src/versions.rs index 4ff7486cd..eae198cec 100644 --- a/ofl/src/versions.rs +++ b/ofl/src/versions.rs @@ -135,14 +135,14 @@ fn update_dependency_version<'doc>( } let dep_version: &mut toml_edit::Value = - if let Some(dep) = dependencies[&package_name].as_table_mut() { + if let Some(dep) = dependencies[package_name].as_table_mut() { if dep.contains_key("version") { dep["version"].as_value_mut().unwrap() } else { // it's a table but it only specifies path or something else weird return false; } - } else if let Some(dep) = dependencies[&package_name].as_value_mut() { + } else if let Some(dep) = dependencies[package_name].as_value_mut() { if let Some(inline) = dep.as_inline_table_mut() { if let Some(version) = inline.get_mut("version") { version diff --git a/src/runtime/var.rs b/src/runtime/var.rs index e9334464b..864d71f3e 100644 --- a/src/runtime/var.rs +++ b/src/runtime/var.rs @@ -33,7 +33,7 @@ impl Var { /// Returns a reference to the latest value, pending or committed. pub fn latest(&self) -> &State { - &self.pending.as_ref().unwrap_or(&self.current) + self.pending.as_ref().unwrap_or(&self.current) } /// Initiate a commit to the state variable. The commit will actually diff --git a/topo/src/lib.rs b/topo/src/lib.rs index a86f3832b..9db2729fe 100644 --- a/topo/src/lib.rs +++ b/topo/src/lib.rs @@ -474,8 +474,6 @@ impl From<&'static Location<'static>> for Callsite { struct Scope { /// current id id: CallId, - /// source location for this scope's root - callsite: Callsite, /// # times each callsite's type has been observed during this scope. callsite_counts: RefCell>, } @@ -491,7 +489,6 @@ impl Scope { { self.increment_count(callsite); let child_point = Self { - callsite, callsite_counts: RefCell::new(Default::default()), id: self.id.child(callsite, slot), }; @@ -523,7 +520,7 @@ impl Scope { impl Default for Scope { fn default() -> Self { - Self { id: CallId::root(), callsite: Callsite::here(), callsite_counts: Default::default() } + Self { id: CallId::root(), callsite_counts: Default::default() } } }