fix compile error: use StrBuf to replace mut ~str