Add feature

This commit is contained in:
Stjepan Glavina 2020-09-20 17:45:24 +02:00
parent 8c7ce8fb5b
commit 272bb11eaf
3 changed files with 13 additions and 1 deletions

View File

@ -38,6 +38,12 @@ jobs:
command: check
args: --all --bins --all-features
- name: Run cargo check without default features
uses: actions-rs/cargo@v1
with:
command: check
args: --no-default-features
- name: Run cargo check
uses: actions-rs/cargo@v1
with:

View File

@ -1,6 +1,6 @@
[package]
name = "polling"
version = "1.0.3"
version = "1.1.0"
authors = ["Stjepan Glavina <stjepang@gmail.com>"]
edition = "2018"
description = "Portable interface to epoll, kqueue, event ports, and wepoll"
@ -12,6 +12,10 @@ keywords = ["mio", "epoll", "kqueue", "iocp", "wepoll"]
categories = ["asynchronous", "network-programming", "os"]
readme = "README.md"
[features]
default = ["std"]
std = []
[dependencies]
cfg-if = "0.1.10"
log = "0.4.11"

View File

@ -46,6 +46,8 @@
//! # std::io::Result::Ok(())
//! ```
#![cfg(feature = "std")]
#![cfg_attr(not(feature = "std"), no_std)]
#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms)]
use std::fmt;