Comments (4)
@nhey there is no need to mark it Copy in this case I think (and I don't think it will work if you try).
However I've fixed Send
+ Sync
in the scroller implementation and released it in v0.8.5.
Thanks for the detailed report.
By the way, I would recommend to use to_items_throttled_stream
IRL, instead of just to_items_stream
in your example, because you will end up really quickly with Slack rate limitation errors.
from slack-morphism-rust.
Hey @nhey , seems like it was forgotten to mark as Send
, I'll check it a bit later today and will fix.
from slack-morphism-rust.
Thanks for the report!
from slack-morphism-rust.
Thanks. I think in some places it could be marked Clone
as well?
Here's my diff with regards to Send + Sync
FWIW, but there may be other places:
diff --git a/src/client/src/scroller.rs b/src/client/src/scroller.rs
index 978056e..186e45a 100644
--- a/src/client/src/scroller.rs
+++ b/src/client/src/scroller.rs
@@ -48,7 +48,7 @@ where
ResponseType = Self::ResponseType,
CursorType = Self::CursorType,
ResponseItemType = Self::ResponseItemType,
- > + 'b,
+ > + Send + Sync + 'b,
>
where
Self: Send + Clone + Sync + 'b,
diff --git a/src/hyper/src/scroller_ext.rs b/src/hyper/src/scroller_ext.rs
index 75f8a23..d6405d0 100644
--- a/src/hyper/src/scroller_ext.rs
+++ b/src/hyper/src/scroller_ext.rs
@@ -9,7 +9,7 @@ use std::time::Duration;
use tokio_stream::StreamExt;
pub trait SlackApiResponseScrollerExt<SCHC, CT, RT, RIT>:
- SlackApiResponseScroller<SCHC, CursorType = CT, ResponseType = RT, ResponseItemType = RIT>
+ SlackApiResponseScroller<SCHC, CursorType = CT, ResponseType = RT, ResponseItemType = RIT> + Send + Sync
where
SCHC: SlackClientHttpConnector + Send + Sync,
RT: Send + Clone + Sync + SlackApiScrollableResponse<CursorType = CT, ResponseItemType = RIT>,
@@ -34,7 +34,7 @@ impl<SCHC, CT, RT, RIT> SlackApiResponseScrollerExt<SCHC, CT, RT, RIT>
CursorType = CT,
ResponseType = RT,
ResponseItemType = RIT,
- >
+ > + Send + Sync
where
SCHC: SlackClientHttpConnector + Send + Sync,
RT: Send + Clone + Sync + SlackApiScrollableResponse<CursorType = CT, ResponseItemType = RIT>,
from slack-morphism-rust.
Related Issues (20)
- `SlackEventsApiMiddlewareService` loses all information from the original request HOT 3
- De-serializing views requires optional parameters to be present HOT 6
- How to use SlackClientHttpConnector for SlackClient? HOT 1
- Missing element types for actions block HOT 5
- Missing `state` field for block actions payload HOT 2
- How can I update my activity? ? HOT 4
- Add `member_joined_channel` event HOT 5
- Proxy support for Socket Mode (WS) HOT 1
- Missing event types: `block_suggestion` UrlEncoded payload POST from slack and a the required response for populating a dropdown HOT 2
- Missing types in Enum SlackMessageEventType HOT 3
- Windows feature flag HOT 2
- Support for replace_original? HOT 3
- Error on reaction_added events HOT 2
- Potential segfault in the time crate HOT 2
- `SlackAppMentionEvent` doesn't include `edited` field HOT 1
- Re-export `http::status::StatusCode` HOT 3
- Message change event parsing is broken HOT 3
- Possibly missing field "user" in message_changed event HOT 2
- Socket mode in a tokio task breaks on Ctrl-C. HOT 6
- Upload binary files HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slack-morphism-rust.