do not allocate empty strings
follow review from @pwoolcoc, and do not use
SafeString::new(&<String>::new())
since this makes an allocation which will then just be thrown away.
Instead, we pass ""
This commit is contained in:
@@ -143,8 +143,8 @@ impl Blog {
|
||||
name: inst.clone(),
|
||||
local: false,
|
||||
// We don't really care about all the following for remote instances
|
||||
long_description: SafeString::new(&<String>::new()),
|
||||
short_description: SafeString::new(&<String>::new()),
|
||||
long_description: SafeString::new(""),
|
||||
short_description: SafeString::new(""),
|
||||
default_license: String::new(),
|
||||
open_registrations: true,
|
||||
short_description_html: String::new(),
|
||||
|
||||
@@ -205,8 +205,8 @@ impl User {
|
||||
public_domain: inst.clone(),
|
||||
local: false,
|
||||
// We don't really care about all the following for remote instances
|
||||
long_description: SafeString::new(&<String>::new()),
|
||||
short_description: SafeString::new(&<String>::new()),
|
||||
long_description: SafeString::new(""),
|
||||
short_description: SafeString::new(""),
|
||||
default_license: String::new(),
|
||||
open_registrations: true,
|
||||
short_description_html: String::new(),
|
||||
|
||||
Reference in New Issue
Block a user