You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: unicode_letter.rs
    path of file: ./repos/tikv/components/tidb_query_datatype/src/codec/collation/encoding
    
    the code of the file until where you have to start completion: // Copyright 2023 TiKV Project Authors. Licensed under Apache-2.0.

/// In order to keep the same behavoir as TiDB that uses go standard library to
/// implement lower and upper functions. Below code is por
    
pub fn unicode_to_lower(ch: char) -> Option<char> {
    let mut r = ch as i32;
    if r < MAX_ASCII {
        if 'A' as i32 <= r && r <= 'Z' as i32 {
            r += ('a' as i32) - ('A' as i32);
        }
        char::from_u32(r as u32)
    } else {
        char::from_u32(to_case(LOWER_CASE, r) as u32)
    }
}