overwrite output file by default

This commit is contained in:
Adam Macdonald 2025-04-08 20:01:43 +01:00
parent ff8ba4ae10
commit 039bfcc201
3 changed files with 4 additions and 3 deletions

2
Cargo.lock generated
View File

@ -54,7 +54,7 @@ dependencies = [
[[package]]
name = "bin2hpp"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"clap",
]

View File

@ -1,6 +1,6 @@
[package]
name = "bin2hpp"
version = "0.1.0"
version = "0.1.1"
authors = ["Adam Macdonald"]
edition = "2024"
license = "Unlicense"

View File

@ -117,7 +117,8 @@ fn main() -> ExitCode {
let output_file = match OpenOptions::new()
.write(true)
.create_new(true)
.truncate(true)
.create(true)
.open(output_path)
{
Ok(f) => f,