Skip to content

Commit c0628fb

Browse files
committed
Merge pull request #64 from cgaebel/master
add show instances, and remove useless mut
2 parents cbbfd66 + c2ae592 commit c0628fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/ast.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ use std::slice;
77
use std::vec;
88

99

10-
#[deriving(PartialEq)]
10+
#[deriving(PartialEq, Show)]
1111
pub struct NumericValue {
1212
pub representation: String,
1313
pub value: f64,
1414
pub int_value: Option<i64>,
1515
}
1616

1717

18-
#[deriving(PartialEq)]
18+
#[deriving(PartialEq, Show)]
1919
pub struct SourceLocation {
2020
pub line: uint, // First line is 1
2121
pub column: uint, // First character of a line is at column 1
@@ -25,7 +25,7 @@ pub struct SourceLocation {
2525
pub type Node = (ComponentValue, SourceLocation); // TODO this is not a good name
2626

2727

28-
#[deriving(PartialEq)]
28+
#[deriving(PartialEq, Show)]
2929
pub enum ComponentValue {
3030
// Preserved tokens.
3131
Ident(String),
@@ -70,7 +70,7 @@ pub enum ComponentValue {
7070

7171

7272
impl ComponentValue {
73-
pub fn to_css(&mut self) -> String {
73+
pub fn to_css(&self) -> String {
7474
let mut css = String::new();
7575
self.to_css_push(&mut css);
7676
css

0 commit comments

Comments
 (0)