diff options
| author | Zeyla Hellyer <[email protected]> | 2017-10-22 18:01:42 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-10-22 18:01:42 -0700 |
| commit | b328b3e09b0095abb54530dc4d50db6b4e3e1779 (patch) | |
| tree | 9af675bd9a608205dd2c29975038822327601a22 /examples/08_env_logging/src | |
| parent | Remove setting of the afk field in shards (diff) | |
| download | serenity-b328b3e09b0095abb54530dc4d50db6b4e3e1779.tar.xz serenity-b328b3e09b0095abb54530dc4d50db6b4e3e1779.zip | |
Remove `on_` prefix to EventHandler tymethods
It was voted that the `on_` prefix is unnecessary, so these have been
dropped.
Diffstat (limited to 'examples/08_env_logging/src')
| -rw-r--r-- | examples/08_env_logging/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/08_env_logging/src/main.rs b/examples/08_env_logging/src/main.rs index db34037..874088a 100644 --- a/examples/08_env_logging/src/main.rs +++ b/examples/08_env_logging/src/main.rs @@ -11,12 +11,12 @@ use std::env; struct Handler; impl EventHandler for Handler { - fn on_ready(&self, _: Context, ready: Ready) { + fn ready(&self, _: Context, ready: Ready) { // Log at the INFO level. This is a macro from the `log` crate. info!("{} is connected!", ready.user.name); } - fn on_resume(&self, _: Context, resume: ResumedEvent) { + fn resume(&self, _: Context, resume: ResumedEvent) { // Log at the DEBUG level. // // In this example, this will not show up in the logs because DEBUG is |