Skip to content

Commit 4856bd6

Browse files
Remove some crates
1 parent 8be63d1 commit 4856bd6

4 files changed

Lines changed: 14 additions & 19 deletions

File tree

Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,14 @@ license = "GPL-3.0-or-later"
2121
exclude = ["target/*", "docs/*", "mkdocs.yml"]
2222

2323
[dependencies]
24-
chrono = "0.4.41"
25-
clap = { version = "4.5.45", features = ["derive"] }
24+
clap = { version = "4.5.48", features = ["derive"] }
2625
gl = "0.14.0"
27-
glam = "0.30.5"
26+
glam = "0.30.8"
2827
glfw = "0.59.0"
29-
image = "0.25.6"
30-
indexmap = "2.10.0"
28+
image = "0.25.8"
29+
indexmap = "2.11.4"
3130
kira = "0.10.8"
3231
rand = "0.9.2"
3332
rfd = "0.15.4"
34-
serde = { version = "1.0.219", features = ["derive"] }
35-
tokio = { version = "1.47.1", features = ["full"] }
36-
toml = "0.8.23"
33+
serde = { version = "1.0.228", features = ["derive"] }
34+
toml = "0.9.7"

src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ struct Args {
4040
additional_args: Vec<String>,
4141
}
4242

43-
#[tokio::main]
44-
async fn main() {
43+
fn main() {
4544
let args = Args::parse();
4645

4746
if let Some(new_project_name) = args.new {
@@ -121,6 +120,5 @@ async fn main() {
121120

122121
let shader_program = ShaderProgram::new(VERT_SHADER, FRAG_SHADER);
123122
runtime
124-
.run(&mut window, &events, &shader_program, &mut glfw)
125-
.await;
123+
.run(&mut window, &events, &shader_program, &mut glfw);
126124
}

src/utils/runtime.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl Runtime {
356356
}
357357
}
358358

359-
pub async fn run(
359+
pub fn run(
360360
&mut self,
361361
window: &mut Window,
362362
events: &glfw::GlfwReceiver<(f64, glfw::WindowEvent)>,

src/utils/sprite/builtins/misc.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,11 @@ pub fn distance(state: &State, args: &[Value], to: bool) -> Result {
280280
pub fn write(state: &State, args: &[Value]) -> Result {
281281
match args {
282282
[Value::String(content)] => {
283-
let time = chrono::Local::now();
284-
let filename = format!(
285-
"{}-{}.png",
286-
state.sprite.name,
287-
time.format("%Y-%m-%d_%H-%M-%S")
288-
);
283+
let time = std::time::SystemTime::now()
284+
.duration_since(std::time::UNIX_EPOCH)
285+
.map_err(|e| e.to_string())?
286+
.as_secs();
287+
let filename = format!("{}-{}.txt", state.sprite.name, time);
289288
let path = Path::new(&state.project.export_path).join(filename);
290289
let mut file = File::create(path).map_err(|e| e.to_string())?;
291290
file.write_all(content.as_bytes())

0 commit comments

Comments
 (0)