Skip to content

Commit 48d3b34

Browse files
authored
Merge pull request #5 from notdijon/tweak
Tweak
2 parents f2e6ffe + 66b3e22 commit 48d3b34

File tree

7 files changed

+7
-4
lines changed

7 files changed

+7
-4
lines changed

.cargo/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

Cargo.toml

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

src/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub(crate) unsafe fn word_to_iter<'a>(
9696
while n > 0 {
9797
let elem = unsafe { *self.word };
9898
if elem.is_null() {
99-
// nothing
99+
break;
100100
} else {
101101
// Safety: elem is not null, so there is at least one more element in the array (possibly null)
102102
self.word = unsafe { self.word.add(1) };

src/info.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub(crate) mod private {
2929
const NAME: *const c_char;
3030
}
3131

32+
#[allow(unreachable_pub)]
3233
pub trait FromInfoValue: Sized {
3334
fn from_info_value(info: Option<&str>) -> Self;
3435
}

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
//! In debug mode (specifically, when `debug_assertions` is enabled), the current thread ID is checked every time the plugin is invoked,
9191
//! which can help detect misbehavior.
9292
93+
#![allow(clippy::result_unit_err)]
9394
#![warn(
9495
missing_debug_implementations,
9596
missing_docs,

src/list.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub(crate) mod private {
3333
const NAME: *const c_char;
3434
}
3535

36+
#[allow(unreachable_pub)]
3637
pub trait FromListElem: Sized {
3738
fn from_list_elem(elem: ListElem<'_>) -> Self;
3839
}

src/pref.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ pub(crate) mod private {
3131
const NAME: *const c_char;
3232
}
3333

34+
#[allow(unreachable_pub)]
3435
#[derive(Debug)]
3536
pub enum PrefValue<'a> {
3637
Str(&'a str),
3738
Int(i32),
3839
Bool(bool),
3940
}
4041

42+
#[allow(unreachable_pub)]
4143
pub trait FromPrefValue: Sized {
4244
fn from_pref_value(pref: PrefValue<'_>) -> Result<Self, ()>;
4345
}

0 commit comments

Comments
 (0)