Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #149

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;