Analogrammer
close
프로필 배경
프로필 로고

Analogrammer

  • 분류 전체보기 (283) N
    • 프로그래밍 (193)
      • C, C++ (38)
      • Rust (49)
      • JAVA (13)
      • Javascript (7)
      • Python (2)
      • Baekjoon (80)
      • React (4)
    • 보안 (54)
      • 하드웨어 해킹 (2)
      • 블록체인 (8)
      • wargame.kr (3)
      • 웹해킹 (6)
      • fuzzing (12)
      • ICS,OT 보안 (14)
      • 시스템해킹 (9)
    • IT (3)
      • 네트워크 (1)
      • 시스템 (2)
    • 수학 (3)
      • 이산수학 (3)
    • 영어 (4)
    • 프로젝트 (0)
    • 기타 (13)
      • 블로그 관리 (2)
      • 활동 (3)
      • 팁 (8)
    • 리뷰 (4) N
    • 자격증 (4)
    • 관심IT슈 (3)
  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

100 Exercises To Learn Rust - 5.11 Dependencies 풀기

문제// TODO: Add `anyhow` as a dependency of this project.// Don't touch this import!// When you import a type (`Error`) from a dependency, the import path must start// with the crate name (`anyhow`, in this case).use anyhow::Error;풀이[package]name = "deps"version = "0.1.0"edition = "2021"[dependencies]anyhow = "1.0.97" Cargo.toml에 dependencies를 추가한다.

  • format_list_bulleted 프로그래밍/Rust
  • · 2025. 3. 18.
  • textsms

100 Exercises To Learn Rust - 5.10 Package 풀기

문제// This is a `main.rs` file, therefore `cargo` interprets this as the root of a binary target.// TODO: fix this broken import. Create a new library target in the `src` directory.// The library target should expose a public function named `hello_world` that takes no arguments// and returns nothing.use packages::hello_world;// This is the entrypoint of the binary.fn main() { hello_world()..

  • format_list_bulleted 프로그래밍/Rust
  • · 2025. 3. 18.
  • textsms

100 Exercises To Learn Rust - 5.9 error trait 풀기

문제 & 풀이// TODO: TicketNewError 열거형에 `Debug`, `Display`, `Error` 트레이트를 구현하세요.// `Display`를 구현할 때, `write!` 매크로를 사용하고 싶을지도 모릅니다.// `std::fmt` 모듈의 문서는 좋은 예시가 될 것입니다.// https://doc.rust-lang.org/std/fmt/index.html#write#[derive(Debug)]enum TicketNewError { TitleError(String), DescriptionError(String),}impl std::fmt::Display for TicketNewError { fn fmt(&self, f: &mut std::fmt::Formatter) ->..

  • format_list_bulleted 프로그래밍/Rust
  • · 2025. 3. 9.
  • textsms

100 Exercises To Learn Rust - 5.8 Error enums 풀기

문제// TODO: title error와 description error에 대응하는 두 개의 배리언트를 사용합니다.// 각각의 배리언트는 무엇이 잘못되었는지 설명하는 문자열을 포함해야 합니다.// `Ticket::new`의 구현 또한 업데이트해야 할 것입니다.enum TicketNewError { }// TODO: `easy_ticket`은 title이 잘못되면 panic을 일으켜야 하고,// `TicketNewError` 열거형에서 관련된 배리언트에 저장된 에러 메시지를 사용합니다.// description이 잘못되면 "Description not provided"라는 기본 description을 사용합니다.fn easy_ticket(title: String, description: String, s..

  • format_list_bulleted 프로그래밍/Rust
  • · 2025. 3. 9.
  • textsms

100 Exercises To Learn Rust - 5.7 Unwrap 풀기

문제// TODO: `easy_ticket`은 title이 유효하지 않을 때 panic이 발생해야 합니다.// description이 유효하지 않다면 "Description not provided"라는 기본 description을 사용합니다.fn easy_ticket(title: String, description: String, status: Status) -> Ticket { todo!()}#[derive(Debug, PartialEq, Clone)]struct Ticket { title: String, description: String, status: Status,}#[derive(Debug, PartialEq, Clone)]enum Status { ToDo, In..

  • format_list_bulleted 프로그래밍/Rust
  • · 2025. 3. 9.
  • textsms

100 Exercises To Learn Rust - 5.6 Fallibility 풀기

문제// TODO: `Ticket::new`를 panic 대신 `Result`를 리턴하도록 변환하세요.// 에러 타입으로는 `String`을 사용합니다.#[derive(Debug, PartialEq)]struct Ticket { title: String, description: String, status: Status,}#[derive(Debug, PartialEq)]enum Status { ToDo, InProgress { assigned_to: String }, Done,}impl Ticket { pub fn new(title: String, description: String, status: Status) -> Ticket { if title.is_..

  • format_list_bulleted 프로그래밍/Rust
  • · 2025. 3. 8.
  • textsms
  • navigate_before
  • 1
  • ···
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • ···
  • 48
  • navigate_next
공지사항
전체 카테고리
  • 분류 전체보기 (283) N
    • 프로그래밍 (193)
      • C, C++ (38)
      • Rust (49)
      • JAVA (13)
      • Javascript (7)
      • Python (2)
      • Baekjoon (80)
      • React (4)
    • 보안 (54)
      • 하드웨어 해킹 (2)
      • 블록체인 (8)
      • wargame.kr (3)
      • 웹해킹 (6)
      • fuzzing (12)
      • ICS,OT 보안 (14)
      • 시스템해킹 (9)
    • IT (3)
      • 네트워크 (1)
      • 시스템 (2)
    • 수학 (3)
      • 이산수학 (3)
    • 영어 (4)
    • 프로젝트 (0)
    • 기타 (13)
      • 블로그 관리 (2)
      • 활동 (3)
      • 팁 (8)
    • 리뷰 (4) N
    • 자격증 (4)
    • 관심IT슈 (3)
최근 글
인기 글
최근 댓글
태그
  • #코딩테스트
  • #프로그래밍
  • #문제풀이
  • #정보보안
  • #C언어
  • #tistory
  • #백준
  • #연습문제
  • #파이썬
  • #코딩
전체 방문자
오늘
어제
전체
Copyright © 쭈미로운 생활 All rights reserved.
Designed by JJuum

티스토리툴바