修复replace name没更新name的问题

This commit is contained in:
shenjack 2024-05-04 11:54:38 +08:00
parent 831bdfedff
commit e144e26166
Signed by: shenjack
GPG Key ID: 7B1134A979775551
3 changed files with 3 additions and 2 deletions

2
Cargo.lock generated
View File

@ -1831,7 +1831,7 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
[[package]]
name = "tswn"
version = "0.1.13"
version = "0.1.14"
dependencies = [
"base16384",
"chrono",

View File

@ -1,7 +1,7 @@
[package]
name = "tswn"
description = "tool shenjack work shop namerena"
version = "0.1.13"
version = "0.1.14"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View File

@ -309,6 +309,7 @@ impl Namer {
#[inline(always)]
pub fn replace_name(&mut self, team_namer: &TeamNamer, name: &str) {
self.val = team_namer.clone_vals();
self.name = name.to_string();
let name_bytes = name.as_bytes();
let name_len = name_bytes.len();