Skip to content

Commit

Permalink
Update to 2018 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
Soft committed Dec 8, 2018
1 parent dc8d3e3 commit 8038f7c
Show file tree
Hide file tree
Showing 7 changed files with 113 additions and 123 deletions.
206 changes: 102 additions & 104 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,17 @@ homepage = "https://soft.github.io/run-or-raise/"
repository = "https://github.com/Soft/run-or-raise"
version = "0.3.1"
exclude = ["_config.yml"]
edition = "2018"

[badges.travis-ci]
repository = "Soft/run-or-raise"

[dependencies]
encoding = "0.2.33"
failure = "0.1.1"
lazy_static = "1.0.0"
failure = "0.1.3"
lazy_static = "1.2.0"
nom = "3.2.1"
regex = "0.2.7"
regex = "1.1.0"
termion = "1.5.1"
xcb = "0.8.2"

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Build Status](https://travis-ci.org/Soft/run-or-raise.svg?branch=master)](https://travis-ci.org/Soft/run-or-raise)
[![Latest Version](https://img.shields.io/crates/v/run-or-raise.svg)](https://crates.io/crates/run-or-raise)
[![GitHub release](https://img.shields.io/github/release/Soft/run-or-raise.svg)](https://github.com/Soft/run-or-raise/releases)
[![dependency status](https://deps.rs/repo/github/soft/run-or-raise/status.svg)](https://deps.rs/repo/github/soft/run-or-raise)
[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/crate/run-or-raise)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

Expand Down
2 changes: 1 addition & 1 deletion src/conditions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use regex::Regex;
use xcb::{self, Connection, Window};
use failure::{Error, err_msg};

use windows::{get_string_property, get_atom};
use crate::windows::{get_string_property, get_atom};

#[derive(Debug,PartialEq)]
pub enum Property {
Expand Down
11 changes: 0 additions & 11 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
extern crate xcb;
extern crate regex;
extern crate encoding;
extern crate termion;
extern crate failure;

#[macro_use]
extern crate nom;
#[macro_use]
extern crate lazy_static;

mod parsing;
mod windows;
mod conditions;
Expand Down
4 changes: 2 additions & 2 deletions src/parsing.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use nom::{IError, space};
use nom::*;
use std::str::FromStr;
use regex::Regex;

use conditions::*;
use crate::conditions::*;

named!(property<&str, Property>,
alt_complete!(value!(Property::Class, tag_s!("class"))
Expand Down
5 changes: 3 additions & 2 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ use std::sync::Mutex;
use std::collections::HashMap;
use encoding::{Encoding, DecoderTrap};
use encoding::all::ISO_8859_1;
use conditions::Condition;
use crate::conditions::Condition;
use failure::{Error, err_msg};
use lazy_static::*;

const XCB_EWMH_CLIENT_SOURCE_TYPE_OTHER: u32 = 2;

Expand All @@ -21,7 +22,7 @@ impl<'a> WindowTreeIter<'a> {
fn new(conn: &'a Connection, win: Window) -> Result<WindowTreeIter<'a>, xcb::GenericError> {
let reply = xcb::query_tree(conn, win).get_reply()?;
Ok(WindowTreeIter {
conn: conn,
conn,
stack: reply.children().to_owned(),
})
}
Expand Down

0 comments on commit 8038f7c

Please sign in to comment.