Skip to content

Commit

Permalink
Auto merge of #37497 - iirelu:proper-vec-brackets-2, r=steveklabnik
Browse files Browse the repository at this point in the history
Make all vec! macros use square brackets: Attempt 2

[The last PR](rust-lang/rust#37476) ended with tears after a valiant struggle with git. I managed to clean up the completely broken history of that into a brand spanking new PR! Yay!

Original:

> Everyone hates the old syntax. I hope. Otherwise this PR has some controversy I wasn't expecting.

> This would be the perfect time to write a lint recommending vec![..] when you use another style.

> Disclaimer: I may have broken something. If I have, I'll fix them when the tests come in. Luckily the chance for a non-syntactical error is pretty low in all this.
  • Loading branch information
bors committed Oct 31, 2016
2 parents cad40c0 + 9f35c2e commit 15c6bdd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
//! struct Edges(Vec<Ed>);
//!
//! pub fn render_to<W: Write>(output: &mut W) {
//! let edges = Edges(vec!((0,1), (0,2), (1,3), (2,3), (3,4), (4,4)));
//! let edges = Edges(vec![(0,1), (0,2), (1,3), (2,3), (3,4), (4,4)]);
//! dot::render(&edges, output).unwrap()
//! }
//!
Expand Down Expand Up @@ -164,8 +164,8 @@
//! struct Graph { nodes: Vec<&'static str>, edges: Vec<(usize,usize)> }
//!
//! pub fn render_to<W: Write>(output: &mut W) {
//! let nodes = vec!("{x,y}","{x}","{y}","{}");
//! let edges = vec!((0,1), (0,2), (1,3), (2,3));
//! let nodes = vec!["{x,y}","{x}","{y}","{}"];
//! let edges = vec![(0,1), (0,2), (1,3), (2,3)];
//! let graph = Graph { nodes: nodes, edges: edges };
//!
//! dot::render(&graph, output).unwrap()
Expand Down Expand Up @@ -226,8 +226,8 @@
//! struct Graph { nodes: Vec<&'static str>, edges: Vec<(usize,usize)> }
//!
//! pub fn render_to<W: Write>(output: &mut W) {
//! let nodes = vec!("{x,y}","{x}","{y}","{}");
//! let edges = vec!((0,1), (0,2), (1,3), (2,3));
//! let nodes = vec!["{x,y}","{x}","{y}","{}"];
//! let edges = vec![(0,1), (0,2), (1,3), (2,3)];
//! let graph = Graph { nodes: nodes, edges: edges };
//!
//! dot::render(&graph, output).unwrap()
Expand Down

0 comments on commit 15c6bdd

Please sign in to comment.