Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
KunalSin9h committed Feb 29, 2024
1 parent 3aa8c30 commit 6d0012c
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 40 deletions.
8 changes: 0 additions & 8 deletions .idea/.gitignore

This file was deleted.

11 changes: 0 additions & 11 deletions .idea/livejq.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serde_json::Value;
use std::io::{self, BufRead};

fn main() {
println!("")
println!("");
let stdin = io::stdin();
let reader = stdin.lock();

Expand Down
8 changes: 2 additions & 6 deletions src/print_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,10 @@ pub fn print_json(json_obj: Value, newline: bool, tab_cnt: usize) {
let terminator = if newline { "\n" } else { "" };

// Creating space to add before value
let mut spaces = String::new();

for _ in 0..tab_cnt {
spaces = spaces + " ";
}
let spaces: String = std::iter::repeat(' ').take(tab_cnt).collect();

match json_obj {
Value::Null => return,
Value::Null => (),

Value::Bool(v) => {
print!("{}{}{}{}", RED, v, NC, terminator);
Expand Down

0 comments on commit 6d0012c

Please sign in to comment.