mirror of
https://github.com/jht5945/prettyjson.git
synced 2025-12-27 17:20:05 +08:00
use util_io::read_to_string
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -7,14 +7,12 @@ mod opt;
|
||||
|
||||
use std::{
|
||||
fs::{self, File},
|
||||
io::{
|
||||
self,
|
||||
prelude::*,
|
||||
}
|
||||
io::{self}
|
||||
};
|
||||
use rust_util::{
|
||||
XResult,
|
||||
util_msg::*,
|
||||
util_io::*,
|
||||
};
|
||||
use opt::*;
|
||||
|
||||
@@ -30,12 +28,6 @@ Written by Hatter Jiang
|
||||
"#, VERSION, &GIT_HASH[0..7]);
|
||||
}
|
||||
|
||||
fn read_to_string(read: &mut dyn Read) -> XResult<String> {
|
||||
let mut buffer = String::new();
|
||||
read.read_to_string(&mut buffer)?;
|
||||
Ok(buffer)
|
||||
}
|
||||
|
||||
|
||||
fn main() {
|
||||
let mut options = Options::new();
|
||||
|
||||
Reference in New Issue
Block a user