Skip to content

Commit

Permalink
Update to 2018 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetech committed Mar 18, 2023
1 parent f2d1f8a commit 9d7c164
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 27 deletions.
1 change: 1 addition & 0 deletions pcsc-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ authors = ["Ran Benita <ran@unusedvar.com>"]
build = "build.rs"
links = "pcsc"
rust-version = "1.38"
edition = "2018"

[build-dependencies]
pkg-config = "0.3.9"
2 changes: 0 additions & 2 deletions pcsc-sys/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate pkg_config;

use std::env;

fn main() {
Expand Down
1 change: 1 addition & 0 deletions pcsc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ homepage = "https://github.com/bluetech/pcsc-rust"
readme = "../README.md"
authors = ["Ran Benita <ran@unusedvar.com>"]
rust-version = "1.38"
edition = "2018"

[dependencies]
bitflags = "1.2.1"
Expand Down
3 changes: 0 additions & 3 deletions pcsc/examples/cancel.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
// Example of how to cancel a blocking Context operation from another
// thread.

extern crate pcsc;

use std::time::Duration;

use pcsc::*;
Expand Down
3 changes: 0 additions & 3 deletions pcsc/examples/connect-owned.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// Example of communication with a smart card.

extern crate pcsc;

use pcsc::*;

fn main() {
Expand Down
4 changes: 0 additions & 4 deletions pcsc/examples/connect.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
// Example of communication with a smart card.

extern crate pcsc;

use pcsc::*;

fn main() {
Expand Down
3 changes: 0 additions & 3 deletions pcsc/examples/list-readers-owned.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// Example of how to enumerate connected card readers.

extern crate pcsc;

use pcsc::*;

fn main() {
Expand Down
3 changes: 0 additions & 3 deletions pcsc/examples/list-readers.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// Example of how to enumerate connected card readers.

extern crate pcsc;

use pcsc::*;

fn main() {
Expand Down
3 changes: 0 additions & 3 deletions pcsc/examples/monitor.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// Example of how to monitor card & card reader state changes.

extern crate pcsc;

use pcsc::*;

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

use pcsc::*;

fn main() {
Expand Down
8 changes: 4 additions & 4 deletions pcsc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,16 @@
//! [8]: https://msdn.microsoft.com/en-us/library/ms953432.aspx#smartcardcspcook_topic2
#![allow(deprecated)]

#[macro_use]
extern crate bitflags;
pub extern crate pcsc_sys as ffi;

use std::ffi::{CStr, CString};
use std::mem::{forget, transmute};
use std::ops::Deref;
use std::os::raw::c_char;
use std::ptr::{null, null_mut};
use std::sync::Arc;

use bitflags::bitflags;
use pcsc_sys as ffi;

use ffi::{DWORD, LONG};

// We use these instead of std::mem::uninitialized -- variables which are
Expand Down Expand Up @@ -347,6 +346,7 @@ pub enum Error {
}

impl Error {
#[allow(clippy::manual_range_contains)]
fn from_raw(raw: LONG) -> Error {
unsafe {
// The ranges here are the "blocks" above.
Expand Down

0 comments on commit 9d7c164

Please sign in to comment.