Skip to content

Commit

Permalink
Go back to a non-workspace structure
Browse files Browse the repository at this point in the history
Kinda reverts #2419
  • Loading branch information
nrc committed Mar 2, 2018
1 parent 6154f2b commit 39301ae
Show file tree
Hide file tree
Showing 40 changed files with 96 additions and 177 deletions.
147 changes: 8 additions & 139 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

71 changes: 62 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,62 @@
[workspace]
members = [
"cargo-fmt",
"git-rustfmt",
"rustfmt-bin",
"rustfmt-config",
"rustfmt-core",
"rustfmt-format-diff",
]
[package]

name = "rustfmt-nightly"
version = "0.4.0"
authors = ["Nicholas Cameron <[email protected]>", "The Rustfmt developers"]
description = "Tool to find and fix Rust formatting issues"
repository = "https://github.com/rust-lang-nursery/rustfmt"
readme = "README.md"
license = "Apache-2.0/MIT"
build = "build.rs"
categories = ["development-tools"]

[lib]
doctest = false

[[bin]]
name = "rustfmt"
path = "src/bin/main.rs"

[[bin]]
name = "cargo-fmt"
path = "src/cargo-fmt/main.rs"

[[bin]]
name = "rustfmt-format-diff"
path = "src/format-diff/main.rs"

[[bin]]
name = "git-rustfmt"
path = "src/git-rustfmt/main.rs"

[features]
default = ["cargo-fmt", "rustfmt-format-diff"]
cargo-fmt = []
rustfmt-format-diff = []

[dependencies]
toml = "0.4"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
unicode-segmentation = "1.0.0"
regex = "0.2"
term = "0.4"
diff = "0.1"
log = "0.3"
env_logger = "0.4"
getopts = "0.2"
derive-new = "0.5"
cargo_metadata = "0.4"
rustc-ap-syntax = "29.0.0"
rustc-ap-rustc_errors = "29.0.0"

[dev-dependencies]
lazy_static = "1.0.0"

[target.'cfg(unix)'.dependencies]
libc = "0.2.11"

[target.'cfg(windows)'.dependencies]
kernel32-sys = "0.2.2"
winapi = "0.2.7"
File renamed without changes.
7 changes: 3 additions & 4 deletions rustfmt-bin/src/main.rs → src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

extern crate env_logger;
extern crate getopts;
extern crate rustfmt_config as config;
extern crate rustfmt_core as rustfmt;
extern crate rustfmt_nightly as rustfmt;

use std::{env, error};
use std::fs::File;
Expand All @@ -22,8 +21,8 @@ use std::path::{Path, PathBuf};

use getopts::{Matches, Options};

use config::{get_toml_path, Color, Config, WriteMode};
use config::file_lines::FileLines;
use rustfmt::config::{get_toml_path, Color, Config, WriteMode};
use rustfmt::config::file_lines::FileLines;
use rustfmt::{run, FileName, Input, Summary};

use std::str::FromStr;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use file_lines::FileLines;
use options::WidthHeuristics;
use config::file_lines::FileLines;
use config::options::WidthHeuristics;

/// Trait for types that can be used in `Config`.
pub trait ConfigType: Sized {
Expand Down Expand Up @@ -102,7 +102,7 @@ macro_rules! create_config {
cloned.verbose = None;
cloned.width_heuristics = None;

toml::to_string(&cloned)
::toml::to_string(&cloned)
.map_err(|e| format!("Could not output config: {}", e.to_string()))
}
}
Expand Down Expand Up @@ -211,7 +211,7 @@ macro_rules! create_config {
}

pub fn from_toml(toml: &str) -> Result<Config, String> {
let parsed: toml::Value =
let parsed: ::toml::Value =
toml.parse().map_err(|e| format!("Could not parse TOML: {}", e))?;
let mut err: String = String::new();
{
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions rustfmt-config/src/lists.rs → src/config/lists.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

//! Configuration options related to rewriting a list.

use IndentStyle;
use config_type::ConfigType;
use config::IndentStyle;
use config::config_type::ConfigType;

/// The definitive formatting tactic for lists.
#[derive(Eq, PartialEq, Debug, Copy, Clone)]
Expand Down
Loading

0 comments on commit 39301ae

Please sign in to comment.