Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
* dev:
  Update dependencies, changelog and version number.
  Silence warning about name ambiguity.
  Silence a clippy warning.
  Remove travis config.
  Fix build on nightly (#7)
  • Loading branch information
najamelan committed Jun 10, 2021
2 parents ad32f2a + 78e793f commit dadacd2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 90 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -17,11 +17,6 @@ jobs:
override: true
components: clippy

- name: Install nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly


- name: Checkout crate
uses: actions/checkout@v2
Expand Down
68 changes: 0 additions & 68 deletions .travis.yml

This file was deleted.

13 changes: 11 additions & 2 deletions CHANGELOG.md
@@ -1,10 +1,19 @@
# Pharos Changelog

## 0.5.1 - 2020-02-18
## [0.5.2] - 2021-06-10

[0.5.2]: https://github.com/najamelan/async_executors/compare/0.5.1...0.5.2

### Fixed

- Remove external_doc for rustdoc 1.54. Thanks to @rajivshah3


## 0.5.1 - 2021-02-18

- Add `ObservableLocal` for observable types that are `!Send`.

## 0.5.0 - 2020-02-17
## 0.5.0 - 2021-02-17

- **BREAKING CHANGE**: `Observable::observe` is now an async function. This was needed to make it possible to send
events to a pharos object from different async tasks. So far notifying was async, but observing was not. However
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Expand Up @@ -7,7 +7,7 @@ status = "actively-developed"
repository = "najamelan/pharos"

[build-dependencies]
rustc_version = "^0.2"
rustc_version = "^0.4"

[dependencies]
[dependencies.futures]
Expand Down Expand Up @@ -39,7 +39,7 @@ license = "Unlicense"
name = "pharos"
readme = "README.md"
repository = "https://github.com/najamelan/pharos"
version = "0.5.1"
version = "0.5.2"

[package.metadata]
[package.metadata.docs]
Expand Down
4 changes: 2 additions & 2 deletions Cargo.yml
Expand Up @@ -24,7 +24,7 @@ package:
# - `git tag x.x.x` with version number.
# - `git push && git push --tags`
#
version : 0.5.1
version : 0.5.2
name : pharos
authors : [ Naja Melan <najamelan@autistici.org> ]
edition : '2018'
Expand Down Expand Up @@ -65,7 +65,7 @@ dev-dependencies:

build-dependencies:

rustc_version: ^0.2
rustc_version: ^0.4


profile:
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
@@ -1,5 +1,5 @@
#![ cfg_attr( nightly, feature( external_doc, doc_cfg ) ) ]
#![ cfg_attr( nightly, doc ( include = "../README.md" ) ) ]
#![ cfg_attr( nightly, feature( doc_cfg ) ) ]
#![ cfg_attr( nightly, cfg_attr( nightly, doc = include_str!("../README.md") ) )]
#![ doc = "" ] // empty doc line to handle missing doc warning when the feature is missing.

#![ doc ( html_root_url = "https://docs.rs/pharos" ) ]
Expand Down
25 changes: 16 additions & 9 deletions src/pharos.rs
Expand Up @@ -190,7 +190,12 @@ impl<Event> Sink<Event> for Pharos<Event> where Event: Clone + 'static + Send
}


// As soon as any is not ready, we are not ready
// As soon as any is not ready, we are not ready.
//
// This is a false warning AFAICT. We need to set obs
// to None at the end, which is not possible if we have flattened the iterator.
//
#[allow(clippy::manual_flatten)]
//
for obs in self.get_mut().observers.iter_mut()
{
Expand Down Expand Up @@ -359,6 +364,8 @@ mod tests
// - ✔ start_send filter message
// - ✔ poll_flush drop on error
//
// TODO: fix the assert_matches ambiguity. Can we use assert!( matches!() ) from std?
//
use crate :: { *, import::* };

#[test]
Expand Down Expand Up @@ -518,14 +525,14 @@ mod tests
{
let mut ph = Pin::new( &mut ph );

assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );
crate::assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );
assert!( ph.as_mut().start_send( true ).is_ok() );

assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Pending );
crate::assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Pending );

assert_eq!( Pin::new( &mut full ).poll_next(cx), Poll::Ready(Some(true)));

assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );
crate::assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );

().into()

Expand Down Expand Up @@ -553,7 +560,7 @@ mod tests

poll_fn( move |mut cx|
{
assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );
crate::assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );

assert!( ph.observers[1].is_none() );

Expand All @@ -576,11 +583,11 @@ mod tests

let mut ph = Pin::new( &mut ph );

assert_matches!( ph.as_mut().poll_close( cx ), Poll::Ready(Ok(())) );
crate::assert_matches!( ph.as_mut().poll_close( cx ), Poll::Ready(Ok(())) );

let res = ph.as_mut().poll_ready( &mut cx );

assert_matches!( res, Poll::Ready( Err(_) ) );
crate::assert_matches!( res, Poll::Ready( Err(_) ) );

match res
{
Expand Down Expand Up @@ -611,7 +618,7 @@ mod tests
{
let mut ph = Pin::new( &mut ph );

assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );
crate::assert_matches!( ph.as_mut().poll_ready( &mut cx ), Poll::Ready( Ok(_) ) );
assert!( ph.as_mut().start_send( 3 ).is_ok() );

assert_eq!( Pin::new( &mut full ).poll_next(cx), Poll::Ready(Some(3)));
Expand Down Expand Up @@ -641,7 +648,7 @@ mod tests

poll_fn( move |mut cx|
{
assert_matches!( ph.as_mut().poll_flush( &mut cx ), Poll::Ready( Ok(_) ) );
crate::assert_matches!( ph.as_mut().poll_flush( &mut cx ), Poll::Ready( Ok(_) ) );

assert!( ph.observers[1].is_none() );
().into()
Expand Down

0 comments on commit dadacd2

Please sign in to comment.