Skip to content

Commit 02ca7e8

Browse files
author
wanglei13866
committed
去掉未使用的导入
1 parent f6ee20b commit 02ca7e8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/hostcalls.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
use std::f32::consts::E;
1615
use crate::dispatcher;
1716
use crate::types::*;
1817
use std::ptr::{null, null_mut};
@@ -271,7 +270,7 @@ pub fn get_map_value(map_type: MapType, key: &str) -> Result<Option<String>, Sta
271270
Ok(string) => Ok(Some(string)), // Successfully converted to String
272271
Err(e) => {
273272
error!("[get_map_value] Failed to convert to UTF-8 string: {}", e);
274-
Err(Status::BadArgument) // Return an appropriate error
273+
Err(Status::SerializationFailure) // Return an appropriate error
275274
}
276275
}
277276
} else {
@@ -1298,7 +1297,6 @@ pub fn increment_metric(metric_id: u32, offset: i64) -> Result<(), Status> {
12981297
mod utils {
12991298
use crate::types::Bytes;
13001299
use std::convert::TryFrom;
1301-
use std::ptr::replace;
13021300
use log::error;
13031301

13041302
pub(super) fn serialize_property_path(path: Vec<&str>) -> Bytes {

0 commit comments

Comments
 (0)