Skip to content

Commit 5025092

Browse files
committed
Replace open_html with open crate
1 parent f63a000 commit 5025092

File tree

3 files changed

+2
-28
lines changed

3 files changed

+2
-28
lines changed

src/handlers/html_opener.rs

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/handlers/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
pub mod execution;
22
mod helpers;
3-
pub mod html_opener;
43
pub mod leetcode;
54
pub mod submission;
65
pub mod user;

src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
use crate::args::Cli;
22
use crate::file_parser::codefile::CodeFile;
3-
use crate::handlers::html_opener::open_html;
43
use crate::utils::{execute_testcases, submit};
54

65
use args::Commands;
@@ -40,7 +39,7 @@ fn main() -> Result<()> {
4039
let filename = "daily_challenge.html";
4140
std::fs::write(filename, question.content)?;
4241
println!("Saved question as HTML to {}", filename.cyan());
43-
open_html(filename);
42+
open::that(filename)?;
4443
}
4544
Some(Commands::Question { question_name }) => {
4645
let question_name = if let Some(idx) = question_name.find("leetcode.com/problems/") {
@@ -62,7 +61,7 @@ fn main() -> Result<()> {
6261
// save to filename
6362
std::fs::write(&filename, question.content)?;
6463
println!("Saved question as HTML to {}", filename.cyan());
65-
open_html(&filename);
64+
open::that(filename)?;
6665
}
6766
Some(Commands::RunCustom {
6867
testcases,

0 commit comments

Comments
 (0)