Skip to content

Commit 1b72806

Browse files
authored
Merge pull request #6 from notdijon/ups
Remove associated type ICE workarounds fixed by rust-lang/rust#85499
2 parents 48d3b34 + 0a32af6 commit 1b72806

File tree

8 files changed

+28
-621
lines changed

8 files changed

+28
-621
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hexavalent"
3-
version = "0.1.6"
3+
version = "0.1.7"
44
authors = ["notdijon <[email protected]>"]
55
license = "MIT"
66
description = "Write HexChat plugins in Rust."

examples/simple.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::cell::{Cell, RefCell};
22
use std::collections::HashSet;
33

44
use hexavalent::event::print::ChannelMessage;
5-
use hexavalent::event::Event;
65
use hexavalent::hook::{Eat, Priority};
76
use hexavalent::{export_plugin, Plugin, PluginHandle};
87

@@ -16,7 +15,7 @@ impl SimplePlugin {
1615
fn message_cb(
1716
&self,
1817
_ph: PluginHandle<'_, Self>,
19-
[nick, _text, _mode, _ident]: <ChannelMessage as Event<'_>>::Args,
18+
[nick, _text, _mode, _ident]: [&str; 4],
2019
) -> Eat {
2120
self.count.set(self.count.get() + 1);
2221
self.nicks.borrow_mut().insert(nick.to_string());

src/event/print.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,14 @@ use crate::event::Event;
3030
///
3131
/// ```rust
3232
/// use hexavalent::PluginHandle;
33-
/// use hexavalent::event::Event;
3433
/// use hexavalent::event::print::ChannelMessage;
3534
/// use hexavalent::hook::{Eat, Priority};
3635
///
3736
/// fn hook_message<P: 'static>(ph: PluginHandle<'_, P>) {
3837
/// ph.hook_print(ChannelMessage, Priority::Normal, message_cb);
3938
/// }
4039
///
41-
/// fn message_cb<P>(
42-
/// plugin: &P,
43-
/// ph: PluginHandle<'_, P>,
44-
/// args: <ChannelMessage as Event<'_>>::Args,
45-
/// ) -> Eat {
40+
/// fn message_cb<P>(plugin: &P, ph: PluginHandle<'_, P>, args: [&str; 4]) -> Eat {
4641
/// let [nick, text, mode, ident] = args;
4742
/// ph.print(&format!(
4843
/// "Message from {} (with mode '{}', ident '{}'): {}\0",

src/event/server.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,14 @@ use crate::event::Event;
1515
///
1616
/// ```rust
1717
/// use hexavalent::PluginHandle;
18-
/// use hexavalent::event::Event;
1918
/// use hexavalent::event::server::Privmsg;
2019
/// use hexavalent::hook::{Eat, Priority};
2120
///
2221
/// fn hook_privmsg<P: 'static>(ph: PluginHandle<'_, P>) {
2322
/// ph.hook_server(Privmsg, Priority::Normal, privmsg_cb);
2423
/// }
2524
///
26-
/// fn privmsg_cb<P>(
27-
/// plugin: &P,
28-
/// ph: PluginHandle<'_, P>,
29-
/// args: <Privmsg as Event<'_>>::Args,
30-
/// ) -> Eat {
25+
/// fn privmsg_cb<P>(plugin: &P, ph: PluginHandle<'_, P>, args: [&str; 4]) -> Eat {
3126
/// let [sender, _, target, text] = args;
3227
/// ph.print(&format!(
3328
/// "Message from {} to {}: {}\0",

0 commit comments

Comments
 (0)