Skip to content

Commit

Permalink
annotate-snippets 0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zbraniecki committed Jul 23, 2019
1 parent 860899e commit 39e4de9
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 36 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
## Unreleased

-

## annotate-snippets 0.6.1 (July 23, 2019)

- Fix too many anonymized line numbers (#5)

## annotate-snippets 0.6.0 (June 26, 2019)

Expand Down
7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "annotate-snippets"
version = "0.6.0"
version = "0.6.1"
edition = "2018"
authors = ["Zibi Braniecki <[email protected]>"]
description = "Library for building code annotations"
Expand All @@ -21,10 +21,9 @@ ansi_term = { version = "0.11.0", optional = true }
[dev-dependencies]
glob = "^0.3"
serde_yaml = "^0.8"
serde = "^1.0"
serde_derive = "^1.0"
serde = { version = "^1.0", features = ["derive"] }
difference = "^2.0"
ansi_term = "^0.11"
ansi_term = "^0.12"

[features]
default = []
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ Usage
-----

```rust
extern crate annotate_snippets;

use annotate_snippets::snippet;

fn main() {
Expand Down
2 changes: 0 additions & 2 deletions examples/expected_type.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate annotate_snippets;

use annotate_snippets::display_list::DisplayList;
use annotate_snippets::formatter::DisplayListFormatter;
use annotate_snippets::snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation};
Expand Down
2 changes: 0 additions & 2 deletions examples/footer.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate annotate_snippets;

use annotate_snippets::display_list::DisplayList;
use annotate_snippets::formatter::DisplayListFormatter;
use annotate_snippets::snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation};
Expand Down
2 changes: 0 additions & 2 deletions examples/format.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate annotate_snippets;

use annotate_snippets::display_list::DisplayList;
use annotate_snippets::formatter::DisplayListFormatter;
use annotate_snippets::snippet::{Annotation, AnnotationType, Slice, Snippet, SourceAnnotation};
Expand Down
2 changes: 0 additions & 2 deletions examples/multislice.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate annotate_snippets;

use annotate_snippets::display_list::DisplayList;
use annotate_snippets::formatter::DisplayListFormatter;
use annotate_snippets::snippet::{Annotation, AnnotationType, Slice, Snippet};
Expand Down
4 changes: 2 additions & 2 deletions src/stylesheets/color.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Style for AnsiTermStyleWrapper {
format!("{}", self.style.paint(text))
}

fn bold(&self) -> Box<Style> {
fn bold(&self) -> Box<dyn Style> {
Box::new(AnsiTermStyleWrapper {
style: self.style.clone(),
})
Expand All @@ -22,7 +22,7 @@ impl Style for AnsiTermStyleWrapper {
pub struct AnsiTermStylesheet {}

impl Stylesheet for AnsiTermStylesheet {
fn get_style(&self, class: StyleClass) -> Box<Style> {
fn get_style(&self, class: StyleClass) -> Box<dyn Style> {
let ansi_term_style = match class {
StyleClass::Error => Fixed(9).bold(),
StyleClass::Warning => Fixed(11).bold(),
Expand Down
7 changes: 2 additions & 5 deletions tests/diff/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
extern crate ansi_term;
extern crate difference;

use self::ansi_term::Color::{Black, Green, Red};
use self::difference::{Changeset, Difference};
use ansi_term::Color::{Black, Green, Red};
use difference::{Changeset, Difference};

pub fn get_diff(left: &str, right: &str) -> String {
let mut output = String::new();
Expand Down
2 changes: 0 additions & 2 deletions tests/dl_from_snippet.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate annotate_snippets;

use annotate_snippets::display_list as dl;
use annotate_snippets::snippet;

Expand Down
7 changes: 1 addition & 6 deletions tests/fixtures.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
mod diff;
mod snippet;

extern crate annotate_snippets;
extern crate glob;
#[macro_use]
extern crate serde_derive;
extern crate serde_yaml;

use crate::snippet::SnippetDef;
use annotate_snippets::display_list::DisplayList;
use annotate_snippets::formatter::DisplayListFormatter;
Expand All @@ -17,6 +11,7 @@ use std::fs::File;
use std::io;
use std::io::prelude::*;
use std::path::Path;
use serde::Deserialize;

fn read_file(path: &str) -> Result<String, io::Error> {
let mut f = File::open(path)?;
Expand Down
2 changes: 0 additions & 2 deletions tests/formatter.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate annotate_snippets;

use annotate_snippets::display_list::*;
use annotate_snippets::formatter::DisplayListFormatter;

Expand Down
7 changes: 2 additions & 5 deletions tests/snippet/mod.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
extern crate annotate_snippets;
extern crate serde;
use serde::{Serialize, Deserialize, Deserializer};

use self::serde::de::{Deserialize, Deserializer};

use self::annotate_snippets::snippet::{
use annotate_snippets::snippet::{
Annotation, AnnotationType, Slice, Snippet, SourceAnnotation,
};

Expand Down

0 comments on commit 39e4de9

Please sign in to comment.