From 145202e37681716bc4c92345fc78b1c9f6aba189 Mon Sep 17 00:00:00 2001 From: Maxwell Elliot Heiber Date: Thu, 30 Dec 2021 11:01:52 +0000 Subject: [PATCH] Remove ': salsa::Database' bound from two examples Two examples had a superfluous bound ': salsa::Database' that wasn't present in the `compiler` example. The `query_group` macro adds this bound automatically. This change can lead to a trailing `+` in the bounds list. I verified this is OK by running the examples and verifying that the production is allowed [per the Rust Reference](https://doc.rust-lang.org/reference/trait-bounds.html) --- examples/compiler/interner.rs | 2 +- examples/hello_world/main.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/compiler/interner.rs b/examples/compiler/interner.rs index 1ef492ae..3aca0897 100644 --- a/examples/compiler/interner.rs +++ b/examples/compiler/interner.rs @@ -1,7 +1,7 @@ use crate::values::*; #[salsa::query_group(InternerDatabase)] -pub trait Interner: salsa::Database { +pub trait Interner { #[salsa::interned] fn intern_field(&self, field: FieldData) -> Field; diff --git a/examples/hello_world/main.rs b/examples/hello_world/main.rs index 394efabe..a3edfc5d 100644 --- a/examples/hello_world/main.rs +++ b/examples/hello_world/main.rs @@ -22,7 +22,7 @@ use std::sync::Arc; // trait for that query group as a supertrait. // ANCHOR:trait #[salsa::query_group(HelloWorldStorage)] -trait HelloWorld: salsa::Database { +trait HelloWorld { // For each query, we give the name, some input keys (here, we // have one key, `()`) and the output type `Arc`. We can // use attributes to give other configuration: