Prompt
Choose clear, consistent, and non-redundant names for identifiers across the codebase. Follow these guidelines:
- Use specific, descriptive names that clearly indicate purpose:
// Bad type SegmentSize = u32; // Good type WalSegmentSize = u32; // Clearly indicates this is for WAL segments - Maintain consistent naming patterns throughout the codebase:
// Bad: Mixing naming patterns struct PostHogLocalEvaluationFlag {} struct LocalEvaluationResponse {} // Good: Consistent naming struct LocalEvaluationFlag {} struct LocalEvaluationResponse {} - Avoid redundant prefixes when context is clear:
// Bad: Redundant context pub http_client: reqwest::Client // In HTTP-specific module // Good: Clean, contextual naming pub client: reqwest::Client - Use clear, specific variable names in method parameters:
// Bad: Ambiguous naming async fn from_request_parts(_: &mut Parts, state: &Arc<ComputeNode>) // Good: Clear purpose async fn from_request_parts(_: &mut Parts, compute: &Arc<ComputeNode>)
This standard helps maintain code readability and reduces confusion during code review and maintenance.