Skip to content

Commit 39301ae

Browse files
committed
Go back to a non-workspace structure
Kinda reverts rust-lang/rustfmt#2419
1 parent 6154f2b commit 39301ae

40 files changed

+96
-177
lines changed

Cargo.lock

Lines changed: 8 additions & 139 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,62 @@
1-
[workspace]
2-
members = [
3-
"cargo-fmt",
4-
"git-rustfmt",
5-
"rustfmt-bin",
6-
"rustfmt-config",
7-
"rustfmt-core",
8-
"rustfmt-format-diff",
9-
]
1+
[package]
2+
3+
name = "rustfmt-nightly"
4+
version = "0.4.0"
5+
authors = ["Nicholas Cameron <[email protected]>", "The Rustfmt developers"]
6+
description = "Tool to find and fix Rust formatting issues"
7+
repository = "https://github.com/rust-lang-nursery/rustfmt"
8+
readme = "README.md"
9+
license = "Apache-2.0/MIT"
10+
build = "build.rs"
11+
categories = ["development-tools"]
12+
13+
[lib]
14+
doctest = false
15+
16+
[[bin]]
17+
name = "rustfmt"
18+
path = "src/bin/main.rs"
19+
20+
[[bin]]
21+
name = "cargo-fmt"
22+
path = "src/cargo-fmt/main.rs"
23+
24+
[[bin]]
25+
name = "rustfmt-format-diff"
26+
path = "src/format-diff/main.rs"
27+
28+
[[bin]]
29+
name = "git-rustfmt"
30+
path = "src/git-rustfmt/main.rs"
31+
32+
[features]
33+
default = ["cargo-fmt", "rustfmt-format-diff"]
34+
cargo-fmt = []
35+
rustfmt-format-diff = []
36+
37+
[dependencies]
38+
toml = "0.4"
39+
serde = "1.0"
40+
serde_derive = "1.0"
41+
serde_json = "1.0"
42+
unicode-segmentation = "1.0.0"
43+
regex = "0.2"
44+
term = "0.4"
45+
diff = "0.1"
46+
log = "0.3"
47+
env_logger = "0.4"
48+
getopts = "0.2"
49+
derive-new = "0.5"
50+
cargo_metadata = "0.4"
51+
rustc-ap-syntax = "29.0.0"
52+
rustc-ap-rustc_errors = "29.0.0"
53+
54+
[dev-dependencies]
55+
lazy_static = "1.0.0"
56+
57+
[target.'cfg(unix)'.dependencies]
58+
libc = "0.2.11"
59+
60+
[target.'cfg(windows)'.dependencies]
61+
kernel32-sys = "0.2.2"
62+
winapi = "0.2.7"
File renamed without changes.

rustfmt-bin/src/main.rs renamed to src/bin/main.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212

1313
extern crate env_logger;
1414
extern crate getopts;
15-
extern crate rustfmt_config as config;
16-
extern crate rustfmt_core as rustfmt;
15+
extern crate rustfmt_nightly as rustfmt;
1716

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

2322
use getopts::{Matches, Options};
2423

25-
use config::{get_toml_path, Color, Config, WriteMode};
26-
use config::file_lines::FileLines;
24+
use rustfmt::config::{get_toml_path, Color, Config, WriteMode};
25+
use rustfmt::config::file_lines::FileLines;
2726
use rustfmt::{run, FileName, Input, Summary};
2827

2928
use std::str::FromStr;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

rustfmt-config/src/config_type.rs renamed to src/config/config_type.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
use file_lines::FileLines;
12-
use options::WidthHeuristics;
11+
use config::file_lines::FileLines;
12+
use config::options::WidthHeuristics;
1313

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

105-
toml::to_string(&cloned)
105+
::toml::to_string(&cloned)
106106
.map_err(|e| format!("Could not output config: {}", e.to_string()))
107107
}
108108
}
@@ -211,7 +211,7 @@ macro_rules! create_config {
211211
}
212212

213213
pub fn from_toml(toml: &str) -> Result<Config, String> {
214-
let parsed: toml::Value =
214+
let parsed: ::toml::Value =
215215
toml.parse().map_err(|e| format!("Could not parse TOML: {}", e))?;
216216
let mut err: String = String::new();
217217
{
File renamed without changes.

rustfmt-config/src/lists.rs renamed to src/config/lists.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
//! Configuration options related to rewriting a list.
1212
13-
use IndentStyle;
14-
use config_type::ConfigType;
13+
use config::IndentStyle;
14+
use config::config_type::ConfigType;
1515

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

0 commit comments

Comments
 (0)