Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
fix(publish): use fs::read_to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleygwilliams committed May 20, 2019
1 parent e30da22 commit 5fef07b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/commands/publish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use route::Route;
use log::info;

use std::fs;
use std::io::Read;
use std::path::Path;

use crate::user::settings::ProjectType;
Expand Down Expand Up @@ -75,10 +74,7 @@ fn multi_script(user: &User, name: &str) -> Result<(), failure::Error> {
}

fn build_js() -> Result<String, failure::Error> {
let mut f = fs::File::open("worker.js")?;
let mut buffer = String::new();
f.read_to_string(&mut buffer)?;
Ok(buffer)
Ok(fs::read_to_string("worker.js")?)
}

fn build_form() -> Result<Form, failure::Error> {
Expand Down

0 comments on commit 5fef07b

Please sign in to comment.