Skip to content

Commit

Permalink
update github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
TimothyYe committed Feb 29, 2024
1 parent 1218dcc commit 097361b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Rust

on:
push:
branches: [ "master" ]
branches: [ "*" ]
pull_request:
branches: [ "master" ]
branches: [ "*" ]

env:
CARGO_TERM_COLOR: always
Expand Down
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use config::Config;
use std::fs::File;
use std::io::Read;

fn load_config() -> Result<Config, Box<dyn std::error::Error>> {
pub fn load_config() -> Result<Config, Box<dyn std::error::Error>> {
let mut file = File::open("config.yaml")?;
let mut content = String::new();

Expand Down
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ mod config;

use server::Server;

fn main() {
fn main() -> Result<(), Box<dyn std::error::Error>> {
let config = config::load_config()?;
println!("{:?}", config);

let server = Server::new("enp3s0".to_string());
server.start();

Ok(())
}

0 comments on commit 097361b

Please sign in to comment.