Skip to content

Commit

Permalink
Formatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirevo committed Apr 18, 2023
1 parent 45fd8e2 commit 3c85a05
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions helpers/readme-render/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use std::fs;
use std::env;
use std::fs;

use alexandrie_rendering::config::{SyntectConfig, SyntectState};

use serde::{Serialize, Deserialize};
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
pub struct Config {
Expand All @@ -12,10 +12,15 @@ pub struct Config {
}

fn main() {
let readme_path = env::args().skip(1).next().expect("could not find a command-line argument");

let contents = fs::read("alexandrie.toml").expect("could not open configuration file `alexandrie.toml`");
let config: Config = toml::from_slice(contents.as_slice()).expect("could not parse configuration file");
let readme_path = env::args()
.skip(1)
.next()
.expect("could not find a command-line argument");

let contents =
fs::read("alexandrie.toml").expect("could not open configuration file `alexandrie.toml`");
let config: Config =
toml::from_slice(contents.as_slice()).expect("could not parse configuration file");

let state = SyntectState::from(config.syntect);

Expand Down

0 comments on commit 3c85a05

Please sign in to comment.