outsource parser in seperate mod
This commit is contained in:
parent
7f1929e636
commit
9333489ff4
@ -6,12 +6,12 @@ rust-latest:
|
|||||||
image: rust:latest
|
image: rust:latest
|
||||||
script:
|
script:
|
||||||
- cargo build --release
|
- cargo build --release
|
||||||
- cargo test
|
- cargo test --release
|
||||||
|
|
||||||
rust-nightly:
|
rust-nightly:
|
||||||
stage: build
|
stage: build
|
||||||
image: rustlang/rust:nightly
|
image: rustlang/rust:nightly
|
||||||
script:
|
script:
|
||||||
- cargo build --release
|
- cargo build --release
|
||||||
- cargo test
|
- cargo test --release
|
||||||
allow_failure: true
|
allow_failure: true
|
@ -1,10 +1,10 @@
|
|||||||
mod mdstat_parser;
|
mod parser;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rocket;
|
extern crate rocket;
|
||||||
|
|
||||||
use rocket::serde::json::Json;
|
use rocket::serde::json::Json;
|
||||||
use crate::mdstat_parser::{MdRaidSystem, parse_mdstat};
|
use crate::parser::mdstat_parser::{MdRaidSystem, parse_mdstat};
|
||||||
|
|
||||||
#[get("/raiddevices")]
|
#[get("/raiddevices")]
|
||||||
fn get_raid_devices() -> Json<MdRaidSystem> {
|
fn get_raid_devices() -> Json<MdRaidSystem> {
|
||||||
|
1
src/parser/mod.rs
Normal file
1
src/parser/mod.rs
Normal file
@ -0,0 +1 @@
|
|||||||
|
pub mod mdstat_parser;
|
Loading…
Reference in New Issue
Block a user