outsource parser in seperate mod
This commit is contained in:
		@@ -6,12 +6,12 @@ rust-latest:
 | 
			
		||||
  image: rust:latest
 | 
			
		||||
  script:
 | 
			
		||||
    - cargo build --release
 | 
			
		||||
    - cargo test
 | 
			
		||||
    - cargo test --release
 | 
			
		||||
 | 
			
		||||
rust-nightly:
 | 
			
		||||
  stage: build
 | 
			
		||||
  image: rustlang/rust:nightly
 | 
			
		||||
  script:
 | 
			
		||||
    - cargo build --release
 | 
			
		||||
    - cargo test
 | 
			
		||||
    - cargo test --release
 | 
			
		||||
  allow_failure: true
 | 
			
		||||
@@ -1,10 +1,10 @@
 | 
			
		||||
mod mdstat_parser;
 | 
			
		||||
mod parser;
 | 
			
		||||
 | 
			
		||||
#[macro_use]
 | 
			
		||||
extern crate rocket;
 | 
			
		||||
 | 
			
		||||
use rocket::serde::json::Json;
 | 
			
		||||
use crate::mdstat_parser::{MdRaidSystem, parse_mdstat};
 | 
			
		||||
use crate::parser::mdstat_parser::{MdRaidSystem, parse_mdstat};
 | 
			
		||||
 | 
			
		||||
#[get("/raiddevices")]
 | 
			
		||||
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;
 | 
			
		||||
		Reference in New Issue
	
	Block a user