Skip to content
This repository was archived by the owner on Nov 30, 2023. It is now read-only.

Commit e399e89

Browse files
committed
more precise cast
1 parent da645fa commit e399e89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/txt.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::ffi::CStr;
22
use std::fmt;
33
use std::marker::PhantomData;
44
use std::os::raw::{
5+
c_char,
56
c_int,
67
c_uchar,
78
c_void,
@@ -126,7 +127,7 @@ impl<'a> TXTResult<'a> {
126127
/// Returns the text in this `TXTResult`.
127128
pub fn text(&self) -> &str {
128129
unsafe {
129-
let c_str = CStr::from_ptr(self.txt_reply.txt as *const i8);
130+
let c_str = CStr::from_ptr(self.txt_reply.txt as *const c_char);
130131
str::from_utf8_unchecked(c_str.to_bytes())
131132
}
132133
}

0 commit comments

Comments
 (0)