Skip to Content
이펙티브 러스트
book

이펙티브 러스트

by 데이비드 드라이스데일, 남기혁
October 2024
Beginner to intermediate
344 pages
7h 44m
Korean
Hanbit Media, Inc.
Content preview from 이펙티브 러스트
288
이펙티브 러스트
아이템
29
: 클리피가 하는 말에 귀 기울여라
편지를 쓰고 계신 것 같은데, 도와드릴까요?
마이크로소프트 클리피
8
아이템
31
에서 러스트 툴박스에서 제공하는 유용한 도구 생태계를 살펴보겠지만, 그중에서도
클리피
Clippy
9
는 별도 아이템을 할애해 설명할 정도로 중요하고 유용한 도구다.
클리피는 카고(
cargo
clippy
)의 추가 구성 요소로서 러스트로 작성한 코드에서 다음 항목에
대한 경고 메시지를 제공한다.
정확성
correctness
: 일반적인 프로그래밍 오류에 대해 경고한다.
관용구
idiom
: 표준 러스트 스타일에서 벗어난 코드를 경고한다.
간결성
concision
: 보다 간결한 코드 표현을 제시한다.
성능
performance
: 불필요한 처리나 할당을 피할 수 있는 대안을 제시한다.
가독성
readability
: 사람이 더 쉽게 읽고 이해할 수 있도록 코드를 변경하는 방법을 제시한다.
예를 들어 다음 코드는 문제없이 빌드된다.
의도하지 않은 동작 발생
pub fn circle_area(radius: f64) -> f64 {
let pi = 3.14;
pi * radius * radius
}
하지만 클리피는
π
에 대한 로컬 근삿값이 필요 없고 정확하지도 않다고 지적한다.
error: approximate value of `f{32, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

이펙티브 타입스크립트

이펙티브 타입스크립트

Dan Vanderkam
파이썬으로 살펴보는 아키텍처 패턴

파이썬으로 살펴보는 아키텍처 패턴

오현석, 해리 퍼시벌, 밥 그레고리

Publisher Resources

ISBN: 9791169212946