Use Cow for user name

O01eg
May 5, 2023, 9:48 AM
B5D2IKSBBGH3DO773BCIJMVYUOTV2RO3G3MSKWGK6VG6TJHHM26QC

Dependencies

  • [2] BVCWJKEX Get auth info for slow game page
  • [3] YQFDKZIU Put FreeOrion version to config for simple update
  • [4] HBDTKI2B Add auth info to password reset
  • [5] MCF5COUL Add personal page
  • [6] WVHXYKCV Add postgresql pools
  • [7] WLWTNO4Y Create form to request game password change link
  • [8] 6NYILMKI Add page for slow game
  • [9] HTYEGVBU Add data to reset password page
  • [10] TRBYOQBI Check CSRF and user existence
  • [11] LTQCLSBU Split database usage in pages
  • [12] AEWYJHUD Start to show player list
  • [13] A2LJT7TT Show duration in turns
  • [14] WW3KRXX6 Add page for reset game password
  • [15] TEB4R7OU Add form to join game
  • [16] H6GGDVHW Show auth info in reset password page
  • [17] FUCFD4UV Add log in and log out support
  • [18] HZDCKIXQ Use constants for templates
  • [19] XKG2L3QB Show label if player could join the game
  • [*] EVP2FSBH Split index page

Change contents

  • replacement in src/pages/slow_game.rs at line 47
    [6.824][2.128:166]()
    common_auth_info: CommonAuthInfo,
    [6.824]
    [6.824]
    common_auth_info: CommonAuthInfo<'a>,
  • replacement in src/pages/slow_game.rs at line 365
    [6.2489][2.354:409]()
    common_auth_info: CommonAuthInfo { user },
    [6.2489]
    [6.2489]
    common_auth_info: CommonAuthInfo {
    user: user.map(Into::into),
    },
  • replacement in src/pages/reset_game_pwd.rs at line 12
    [6.921][6.142:180]()
    common_auth_info: CommonAuthInfo,
    [6.921]
    [6.921]
    common_auth_info: CommonAuthInfo<'a>,
  • replacement in src/pages/reset_game_pwd.rs at line 94
    [6.2468][6.367:422]()
    common_auth_info: CommonAuthInfo { user },
    [6.2468]
    [6.2468]
    common_auth_info: CommonAuthInfo {
    user: user.map(Into::into),
    },
  • replacement in src/pages/query_reset_game_pwd.rs at line 11
    [6.1144][6.1144:1162](),[6.1162][4.556:594]()
    struct PageData {
    common_auth_info: CommonAuthInfo,
    [6.1144]
    [6.1162]
    struct PageData<'a> {
    common_auth_info: CommonAuthInfo<'a>,
  • replacement in src/pages/query_reset_game_pwd.rs at line 50
    [4.964][4.964:1019]()
    common_auth_info: CommonAuthInfo { user },
    [4.964]
    [4.1019]
    common_auth_info: CommonAuthInfo {
    user: user.map(Into::into),
    },
  • replacement in src/pages/my.rs at line 9
    [5.1239][5.1239:1295]()
    struct PageData {
    common_auth_info: CommonAuthInfo,
    [5.1239]
    [5.1295]
    struct PageData<'a> {
    common_auth_info: CommonAuthInfo<'a>,
  • replacement in src/pages/my.rs at line 77
    [5.3333][5.3333:3404]()
    common_auth_info: CommonAuthInfo { user: Some(user) },
    [5.3333]
    [5.3404]
    common_auth_info: CommonAuthInfo {
    user: Some(user.into()),
    },
  • replacement in src/pages/mod.rs at line 39
    [6.1438][6.1438:1496]()
    pub struct CommonAuthInfo {
    pub user: Option<String>,
    [6.1438]
    [6.1496]
    pub struct CommonAuthInfo<'a> {
    pub user: Option<std::borrow::Cow<'a, str>>,
  • replacement in src/pages/index.rs at line 9
    [3.151][6.6229:6271](),[6.6229][6.6229:6271]()
    pub common_auth_info: CommonAuthInfo,
    [3.151]
    [3.152]
    pub common_auth_info: CommonAuthInfo<'a>,
  • replacement in src/pages/index.rs at line 24
    [6.6601][6.6601:6656]()
    common_auth_info: CommonAuthInfo { user },
    [6.6601]
    [3.179]
    common_auth_info: CommonAuthInfo {
    user: user.map(Into::into),
    },