Skip to content

Commit

Permalink
refactor(cmdline): create a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
deniskovalchuk committed Sep 22, 2023
1 parent e988777 commit db4b6d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/cmdline/src/command_handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,10 @@ void command_handler::size(const std::vector<std::string> & args)

ftp::file_size_reply reply = ftp_client_.get_file_size(remote_file);

if (reply.get_size())
const std::optional<std::uint64_t> size = reply.get_size();
if (size)
{
std::cout << reply.get_size().value() << " bytes."<< std::endl;
std::cout << size.value() << " bytes."<< std::endl;
}
}

Expand Down

0 comments on commit db4b6d7

Please sign in to comment.