v0.4.8 better errors #9
@ -199,8 +199,9 @@ fn read_readable(mut readable:impl std::io::Read)->std::io::Result<Vec<u8>>{
|
||||
#[derive(Clone)]
|
||||
pub struct Cookie(String);
|
||||
impl Cookie{
|
||||
/// cookie is prepended with ".ROBLOSECURITY=" by this function
|
||||
pub fn new(cookie:String)->Self{
|
||||
Self(cookie)
|
||||
Self(format!(".ROBLOSECURITY={cookie}"))
|
||||
}
|
||||
pub fn get(self)->String{
|
||||
self.0
|
||||
|
@ -621,7 +621,7 @@ async fn cookie_from_args(literal:Option<String>,environment:Option<String>,file
|
||||
(None,None,Some(cookie_file))=>tokio::fs::read_to_string(cookie_file).await?,
|
||||
_=>Err(anyhow::Error::msg("Illegal cookie argument triple"))?,
|
||||
};
|
||||
Ok(Cookie::new(format!(".ROBLOSECURITY={cookie}")))
|
||||
Ok(Cookie::new(cookie))
|
||||
}
|
||||
async fn api_key_from_args(literal:Option<String>,environment:Option<String>,file:Option<PathBuf>)->AResult<ApiKey>{
|
||||
let api_key=match (literal,environment,file){
|
||||
|
Loading…
Reference in New Issue
Block a user