Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Aug 21, 2024
1 parent fff653d commit cddb2dd
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion rustc-flags
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
--deny=absolute_paths_not_starting_with_crate
--deny=dead_code
--deny=elided_lifetimes_in_paths
--deny=explicit_outlives_requirements
--deny=keyword_idents
Expand All @@ -25,6 +26,5 @@
--deny=unused_lifetimes
--deny=unused_macro_rules
--deny=unused_qualifications
--deny=unused_tuple_struct_fields
--deny=variant_size_differences
--deny=warnings
2 changes: 1 addition & 1 deletion treeedbgen-souffle-c/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use predicates::prelude::*;
use tempfile::NamedTempFile;

#[test]
fn gen() -> Result<(), Box<dyn std::error::Error>> {
fn test_gen() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("treeedbgen-souffle-c")?;
let tmp = NamedTempFile::new()?;
cmd.arg("-o").arg(tmp.path());
Expand Down
2 changes: 1 addition & 1 deletion treeedbgen-souffle-csharp/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use predicates::prelude::*;
use tempfile::NamedTempFile;

#[test]
fn gen() -> Result<(), Box<dyn std::error::Error>> {
fn test_gen() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("treeedbgen-souffle-csharp")?;
let tmp = NamedTempFile::new()?;
cmd.arg("-o").arg(tmp.path());
Expand Down
2 changes: 1 addition & 1 deletion treeedbgen-souffle-java/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use predicates::prelude::*;
use tempfile::NamedTempFile;

#[test]
fn gen() -> Result<(), Box<dyn std::error::Error>> {
fn test_gen() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("treeedbgen-souffle-java")?;
let tmp = NamedTempFile::new()?;
cmd.arg("-o").arg(tmp.path());
Expand Down
2 changes: 1 addition & 1 deletion treeedbgen-souffle-javascript/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use predicates::prelude::*;
use tempfile::NamedTempFile;

#[test]
fn gen() -> Result<(), Box<dyn std::error::Error>> {
fn test_gen() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("treeedbgen-souffle-javascript")?;
let tmp = NamedTempFile::new()?;
cmd.arg("-o").arg(tmp.path());
Expand Down
2 changes: 1 addition & 1 deletion treeedbgen-souffle-rust/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use predicates::prelude::*;
use tempfile::NamedTempFile;

#[test]
fn gen() -> Result<(), Box<dyn std::error::Error>> {
fn test_gen() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("treeedbgen-souffle-rust")?;
let tmp = NamedTempFile::new()?;
cmd.arg("-o").arg(tmp.path());
Expand Down
2 changes: 1 addition & 1 deletion treeedbgen-souffle-souffle/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use predicates::prelude::*;
use tempfile::NamedTempFile;

#[test]
fn gen() -> Result<(), Box<dyn std::error::Error>> {
fn test_gen() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("treeedbgen-souffle-souffle")?;
let tmp = NamedTempFile::new()?;
cmd.arg("-o").arg(tmp.path());
Expand Down
2 changes: 1 addition & 1 deletion treeedbgen-souffle-swift/tests/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use predicates::prelude::*;
use tempfile::NamedTempFile;

#[test]
fn gen() -> Result<(), Box<dyn std::error::Error>> {
fn test_gen() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("treeedbgen-souffle-swift")?;
let tmp = NamedTempFile::new()?;
cmd.arg("-o").arg(tmp.path());
Expand Down
4 changes: 2 additions & 2 deletions treeedbgen-souffle/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ pub fn main(node_types: &str) -> Result<()> {
if let Some(path) = args.output {
let mut file = std::fs::File::create(&path)
.with_context(|| format!("Failed to write to file {}", path))?;
super::gen(&config, &mut file, node_types)?;
super::r#gen(&config, &mut file, node_types)?;
} else {
// https://nnethercote.github.io/perf-book/io.html#locking
let stdout = std::io::stdout();
let mut lock = stdout.lock();
super::gen(&config, &mut lock, node_types)?;
super::r#gen(&config, &mut lock, node_types)?;
}
Ok(())
}
2 changes: 1 addition & 1 deletion treeedbgen-souffle/src/gen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ fn declare_child(config: &PrivGenConfig, w: &mut impl Write) -> Result<(), GenEr
Ok(())
}

pub fn gen(
pub fn r#gen(
config: &GenConfig,
w: &mut impl Write,
node_types_json_str: &str,
Expand Down
4 changes: 2 additions & 2 deletions treeedbgen-souffle/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod gen;
pub use gen::*;
mod r#gen;
pub use r#gen::*;

#[cfg(feature = "cli")]
pub mod cli;

0 comments on commit cddb2dd

Please sign in to comment.