Commit graph

306 commits

Author SHA1 Message Date
Oliver Schneider
1655583b02 handle windows newlines 2015-05-04 12:50:24 +02:00
Marcus Klaas
58a14fbc79 Correctly indent use items and functions 2015-05-04 09:25:20 +02:00
Matthew Hall
59352172b3 Change import lists with one item to single import
Changes lists such as ``use std::{fmt}`` to a form without a list, eg
``use std::fmt``.
2015-05-02 20:28:38 +01:00
defyrlt
59554dd5e1 Resolved #56 -- mut was eaten out of mut self in fn args. 2015-05-02 20:27:08 +01:00
Oliver Schneider
62e583d4cf split main function and test function into their own files
small modifications to make executable and test compile properly
2015-05-01 22:28:58 +02:00
Oliver Schneider
e6e7ce178f main.rs -> lib.rs 2015-05-01 22:24:53 +02:00
Steven Allen
c006b84d87 Trust the borrow checker. 2015-05-01 12:17:14 -04:00
Nick Cameron
2b73dcd662 Merge pull request #57 from defyrlt/issue_56
`mut` was eaten out of `mut self` in fn args.
2015-05-01 23:16:54 +12:00
defyrlt
81c9db3275 Resolved #56 -- mut was eaten out of mut self in fn args. 2015-05-01 14:14:04 +03:00
Theodore DeRego
4f75227714 Spaces around in type bounds 2015-04-30 16:52:11 -10:00
Tobias Bucher
2145108043 Rename src/mod.rs to src/main.rs to adhere to the standard crate format 2015-04-30 13:37:09 +02:00
Nick Cameron
4560df2567 Merge pull request #43 from tbu-/pr_nostaticmut
Use `AtomicUsize` instead of `static mut` that require `unsafe`
2015-04-30 21:13:36 +12:00
Nick Cameron
0931b7c6df Merge pull request #45 from tbu-/pr_toowned
Change `to_string` to `to_owned` when it just creates a `String` from a `&str`
2015-04-30 21:10:54 +12:00
Nick Cameron
8a0a1bdcd1 Merge pull request #46 from tbu-/pr_testwarnings
Fix warnings in `cargo test`
2015-04-30 21:10:25 +12:00
Tobias Bucher
2f221fd095 Use AtomicUsize instead of static mut that require unsafe 2015-04-30 10:40:37 +02:00
Tobias Bucher
5247d98d31 Change to_string to to_owned when it just creates a String from a &str
This means that it doesn't have to go through the formatting hierarchy and can
just immediately reserve enough memory.
2015-04-30 10:31:42 +02:00
Manish Goregaokar
9398aed82c Handle pub use (fixes #23) 2015-04-30 13:52:28 +05:30
Tobias Bucher
dc3e236599 Fix warnings in cargo test 2015-04-30 09:32:38 +02:00
Nick Cameron
25fcb7754a Add README.md 2015-04-30 15:09:33 +12:00
Nick Cameron
2d5226b825 Use + for type bounds 2015-04-29 16:44:29 +12:00
Nick Cameron
f61ad35494 Preserve linebreaks in doc comments 2015-04-29 16:25:52 +12:00
Nick Cameron
16f9057975 Better handle trait items 2015-04-29 15:24:20 +12:00
Nick Cameron
2e485ea086 Better attribute handling 2015-04-29 15:03:15 +12:00
Nick Cameron
decafbbaea Fix trailing commas in where clauses 2015-04-29 09:55:24 +12:00
Nick Cameron
40be79304e Tweak rules around attributes for modules 2015-04-28 22:19:25 +12:00
Nick Cameron
81b8eb7993 Comments on their own lines between args 2015-04-28 21:57:16 +12:00
Nick Cameron
cdfda8801e Absolute paths 2015-04-28 21:36:31 +12:00
Nick Cameron
9070a055de Comments after return 2015-04-28 21:24:56 +12:00
Nick Cameron
a84287c6b0 Comments in function decls and annotations/doc comments 2015-04-28 20:56:01 +12:00
Nick Cameron
c00970f5e9 Indenting for modules
rustfmt now bootstraps!
2015-04-23 18:43:46 +12:00
Nick Cameron
daff43f761 Arg/line length bug 2015-04-23 18:35:56 +12:00
Nick Cameron
4faaa4dab2 minor reformatting 2015-04-23 18:10:43 +12:00
Nick Cameron
28d90bc439 trailing newline hell fixed 2015-04-23 18:02:55 +12:00
Nick Cameron
0c5f5082dc terminating newline bug 2015-04-23 17:04:07 +12:00
Nick Cameron
2819738ff1 Fix formatting in changes.rs 2015-04-23 16:30:19 +12:00
Nick Cameron
bc7855d347 Idempotent tests and comments in function decls 2015-04-23 16:22:48 +12:00
Nick Cameron
854b52dbed Keep comments on fn arguments 2015-04-21 22:50:43 +12:00
Nick Cameron
4c869a1b9d Extract out more files 2015-04-21 21:01:19 +12:00
Nick Cameron
8ca3dc063e Refactor missing spans and fix bug with trailing whitespace 2015-04-21 20:40:36 +12:00
Nick Cameron
6e082f7aad Extract some methods for functions. 2015-04-21 19:59:48 +12:00
Nick Cameron
a652a83ffd Trivial reformatting 2015-04-21 16:49:16 +12:00
Nick Cameron
defcceb879 Pull out some functionality into separate files 2015-04-21 16:47:15 +12:00
Nick Cameron
986de65b97 Write output to files 2015-04-21 16:28:10 +12:00
Nick Cameron
eccf43536b Some configuration options for function layout 2015-04-21 12:02:30 +12:00
Nick Cameron
5ff6a45022 By value self in functions 2015-04-21 09:54:04 +12:00
Nick Cameron
6dbb3ef2f1 Function visibility 2015-04-21 09:38:16 +12:00
Nick Cameron
0a67babb95 Work across multiple files 2015-04-14 21:52:12 +12:00
Nick Cameron
8f5b899c85 Use strings.rs rather than local modules 2015-04-14 13:13:35 +12:00
Nick Cameron
76854677c1 New reformatting of fns 2015-04-14 13:00:46 +12:00
Steven Allen
0fd4b6a150 Update for new FnKind::FkMethod signature 2015-03-22 09:30:04 -07:00
Dan Glastonbury
33e12c58b9 Update from Path to PathBuf 2015-03-09 16:17:14 +10:00
Nick Cameron
3f58f829f3 A different, more pretty printing approach.
No longer uses the Rope data strucure.
2015-03-09 17:18:48 +13:00
Nick Cameron
4fd5f86732 Add string_buffer (not used yet) 2015-03-08 19:24:56 +13:00
Nick Cameron
7417ab5aed Working prototype
Implements a few formatting options using an approach where we modify the source using a rope. Uses very ad-hoc rules for formatting.
2015-03-08 11:46:35 +13:00
Nick Cameron
f1e698c838 Save changes in the rope.
Also changes to using the new rustc interface
2015-02-02 21:59:03 +13:00
Nick Cameron
5caf49ff63 Commit changes code using map of adjustments 2015-01-26 15:20:30 +13:00